Files
harbour-core/harbour/source/macro/macro.yyc
Przemyslaw Czerpak 26a11bd859 2009-03-21 16:07 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/bin/hb-func.sh
    ! restored default optimization flag (-O3) in hb* scripts

  * harbour/harbour.spec
    ! fixed recent modification

  * harbour/contrib/rddads/ads1.c
  * harbour/contrib/rddads/adsfunc.c
  * harbour/contrib/hbmisc/strfmt.c
  * harbour/contrib/hbcrypt/sha1.c
    ! fixed wrongly used C reference operator

  * harbour/contrib/hbwin/win_prn2.c
  * harbour/contrib/hbwin/wapi_commctrl.c
  * harbour/source/vm/maindllp.c
    ! fixes for unicode builds

  * harbour/include/std.ch
    + added SET TIME FORMAT [TO] <f>

  * harbour/include/set.ch
  * harbour/include/hbset.h
  * harbour/source/vm/set.c
    + added _SET_TIMEFORMAT
      The folowing modifiers are supported:
         hh - hours
         mm - minutes
         ss - seconds
         fff - fraction part of seconds
         p - 1-st letter from PM / AM signature. When used time is shown
             in 12 hour format otherwise 24 hour format is used
      ex: Set( __SET_TIMEFORMAT, "hh:mm pm" )
      default _SET_TIMEFORMAT value is "hh:mm:ss:fff"
    + added C function: char * hb_setGetTimeFormat( void );

  * harbour/include/hbpp.h
  * harbour/source/pp/ppcore.c
    + added support for timestamp constant values in the form:
         t"YYYY-MM-DD HH:MM:SS.fff"
      The exact accepted timestamp pattern is is:
         YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
      i.e.:
         tValue := t"2009-03-21 5:31:45.437 PM"
      or:
         YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
      with literal "T" as date and time part delimiters (XML timestamp
      format), i.e.:
         tValue := t"2009-03-21T17:31:45.437"
      The folowing characters can be used as date delimiters: "-", "/", "."
      if PM or AM is used HH is in range < 1 : 12 > otherwise
      in range < 0 : 23 >

  * harbour/source/compiler/complex.c
  * harbour/source/compiler/harbour.y
  * harbour/source/compiler/harbour.yyc
  * harbour/source/compiler/harbour.yyh
    + added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
      to compiler
    + added support for VFP datetime constant values:
         { ^ [ YYYY-MM-DD [,] ] [ HH[:MM[:SS][.FFF]] [AM|PM] ] }
      The following characters can be used as date delimiters: "-", "/".
      Dot "." as date delimiter is not supported.
      There is no limit on number of characters in YYYY, MM, DD, HH, MM,
      SS, FFF parts. Important is only their value. This is the format
      in semi PP notation:
         { ^ <YEAR> <sep:/-> <MONTH> <sep:/-> <DAY> [[<sep2:,>]
           [ <HOUR> [ : <MIN> [ : <SEC> [ . <FRAQ> ] ] ] [AM|PP] ] }
      In practice it allows to also parse xHarbour datetime constant
      values with compatible conditions though xHarbour support onlu "/"
      as date delimiter.
      NOTE: there is one important difference to VFP and xHarbour in
      decoding above format. In VFP and xHarbour when date part is
      missing then it's set by default to: 1899-12-30 so this code:
         { ^ 12:00 }
      gived the same results as:
         { ^ 1899/12/30 12:00 }
      Harbour does not set any default date value when timestamp
      constant value contains only time part.
      If you want we can change it for strict VFP compatiblity.
      Now this extension is enabled by default for testing. In the future
      it will be probably covered by HB_COMPAT_FOXPRO macro.

  * harbour/source/macro/macro.yyc
  * harbour/source/macro/macro.y
  * harbour/source/macro/macro.yyh
  * harbour/source/macro/macrolex.c
    + added support for t"YYYY-MM-DD HH:MM:SS.fff" time stamp constant
      to macro compiler

  * harbour/include/hbmacro.h
  * harbour/source/vm/macro.c
    + added new function:
      void hb_macroGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );

  * harbour/include/hberrors.h
  * harbour/source/compiler/hbgenerr.c
    + added new compile time error: "Invalid timestamp constant '%s'"

  * harbour/source/compiler/cmdcheck.c
    * use Harbour API timestamp functions instead of calling system
      functions

  * harbour/include/hbpcode.h
  * harbour/source/compiler/hbfix.c
  * harbour/source/compiler/hbpcode.c
  * harbour/source/compiler/hbdead.c
  * harbour/source/compiler/genc.c
  * harbour/source/compiler/gencc.c
  * harbour/source/compiler/hblbl.c
  * harbour/source/compiler/hbstripl.c
  * harbour/source/compiler/hbopt.c
    + added new PCODE HB_P_PUSHTIMESTAMP (replaced one unused PCODE value)
      to store timestamp constant values in the PCODE

  * harbour/include/hbcomp.h
  * harbour/source/compiler/hbmain.c
    + added new function:
      void hb_compGenPushTimeStamp( LONG lDate, LONG lTime, HB_COMP_DECL );

  * harbour/include/hbexprop.h
  * harbour/source/common/expropt1.c
    + added new C functions:
      HB_EXPR_PTR hb_compExprNewTimeStamp( LONG, LONG, HB_COMP_DECL );

  * harbour/include/hbexprb.c
  * harbour/include/hbcompdf.h
  * harbour/source/common/expropt2.c
    + added timestamp expressions support
    + added compile time optimization for timestamp expressions
    * updated function optimization for timestamp expressions

  * harbour/include/hbdate.h
  * harbour/source/common/hbdate.c
    * changed hb_dateMilliSeconds() to return UTC julian timestamp in
      milliseconds
    * changed existing seconds, time and timestamp functions to operate
      on common OS specific functions to eliminate possible problems
      with different OS time counters
    + added new functions to operates on time and timestamp values.
      See source code for details.

  + harbour/source/rtl/cputime.c
    * moved double hb_secondsCPU( int n ) function to separate file

  * harbour/source/rtl/seconds.c
    - removed old version of date/seconds functions

  * harbour/source/vm/hashes.c
  * harbour/source/vm/arrays.c
    + added support for timestamp values as hash item indexes

  * harbour/source/vm/hashfunc.c
    + added support for find timestamp values in hash and array items
      by simple date value in AScan(), hb_HScan(), hb_AScan() and hb_RAScan()
      functions when exact comparison is not used.

  * harbour/source/vm/asort.c
    + added support for sorting timestamp values

  * harbour/source/vm/classes.c
    + added support for timestamp scallar classes
    + added support for timestamp typed instance variables

  * harbour/source/vm/memvars.c
    + added support for timestamp values in .mem files

  * harbour/source/vm/estack.c
    + show timestamp values in stack dump

  * harbour/include/hbapi.h
  * harbour/source/vm/arrays.c
    + added new C functions:
      double hb_arrayGetTD( PHB_ITEM pArray, ULONG ulIndex );
      BOOL hb_arraySetTD( PHB_ITEM pArray, ULONG ulIndex, double dTimeStamp )
      BOOL hb_arrayGetTDT( PHB_ITEM pArray, ULONG ulIndex,
                           LONG * plJulian, LONG * plMilliSec );
      BOOL hb_arraySetTDT( PHB_ITEM pArray, ULONG ulIndex,
                           LONG lJulian, LONG lMilliSec );

  * harbour/include/hbapi.h
  * harbour/source/vm/extend.c
    + accept timestamp items in date functions - use only date part of
      timestamp value
    + added new C functions:
      double hb_partd( int iParam, ... );
      BOOL hb_partdt( LONG * plJulian, LONG * plMilliSec , int iParam, ... );
      void hb_rettd( double dTimeStamp );
      void hb_rettdt( LONG lJulian, LONG lMilliSec );
      int hb_stortd( double dTimeStamp, int iParam, ... );
      int hb_stortdt( LONG lJulian, LONG lMilliSec, int iParam, ... );

  * harbour/include/hbapiitm.h
  * harbour/source/vm/itemapi.c
    + accept timestamp items in date functions - use only date part of
      timestamp value
    + added new C functions:
      char * hb_itemGetTS( PHB_ITEM pItem, char * szDateTime );
      PHB_ITEM hb_itemPutTS( PHB_ITEM pItem, const char * szDateTime );
      double hb_itemGetTD( PHB_ITEM pItem );
      PHB_ITEM hb_itemPutTD( PHB_ITEM pItem, double dTimeStamp )
      BOOL hb_itemGetTDT( PHB_ITEM pItem, LONG * plJulian, LONG * plMilliSec );
      PHB_ITEM hb_itemPutTDT( PHB_ITEM pItem, LONG lJulian, LONG lMilliSec );
    + support for timestamp items in hb_itemString(), hb_itemPadConv() and
      hb_itemTypeStr() functions

  * harbour/include/hbvm.h
  * harbour/include/hbxvm.h
  * harbour/include/hbapi.h
  * harbour/source/vm/hvm.c
    + added HB_IT_TIMESTAMP items
    * modified HB_IT_DATE internal item structure to use common structure
      with HB_IT_TIMESTAMP - it  simplifies HVM code and eliminates additional
      RT conditions.
    + added HB_IS_TIMESTAMP() and ISTIMESTAMP() macros
    + added HB_IS_DATETIME() and ISDATETIME() macros - they return true
      if item/parameter is DATE or TIMESTAMP type.
    + added void hb_vmPushTimeStamp( long lJulian, long lMilliSec );
      and xhb_vmPushTimeStamp()
    + added support for timestamp values in relational operators:
         <, <=, >, >=, =, ==
      When two timestamp values are compared then VM compares date and
      time parts in both values.
      When date and timestamp values are used in <, <=, >, >=, = operations
      then VM compares only date part in both values.
      When date and timestamp values are used in == operation then VM
      compares date part in both values and then check if time part
      of timestamp value is 0.
    + added support for timestamp values in + and - math operations.
      The following rules are used in timestamp arithmetic:
         <t> + <t> => <t>
         <t> - <t> => <n>
         <t> + <n> => <t>
         <n> + <t> => <t>
         <t> - <n> => <t>
         <d> + <t> => <t>
         <t> + <d> => <t>
         <d> - <t> => <n>
         <t> - <d> => <n>
      When number is result or argument of timestamp operation then the
      its integer part is a number of day and fractional part is the time.

  * harbour/source/rtl/dateshb.c
    + added new .prg functions to mange date and timestamp values:
      HB_DATETIME() -> <tTimeStamp>
      HB_CTOD( <cDate> [, <cDateFormat> ] ) -> <dDate>
      HB_DTOC( <dDate> [, <cDateFormat> ] ) -> <cDate>
      HB_NTOT( <nValue> ) -> <tTimeStamp>
      HB_TTON( <tTimeStamp> ) -> <nValue>
      HB_TTOC( <tTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
                                                            <cTimeStamp>
      HB_CTOT( <cTimeStamp>, [ <cDateFormat> ] [, <cTimeFormat> ] ) ->
                                                            <tTimeStamp>
      HB_TTOS( <tTimeStamp> ) -> <cYYYYMMDDHHMMSSFFF>
      HB_STOT( <cDateTime> ) -> <tTimeStamp>
         <cDateTime> should be in one of the above form:
            - "YYYYMMDDHHMMSSFFF"
            - "YYYYMMDDHHMMSSFF"
            - "YYYYMMDDHHMMSSF"
            - "YYYYMMDDHHMMSS"
            - "YYYYMMDDHHMM"
            - "YYYYMMDDHH"
            - "YYYYMMDD"
            - "HHMMSSFFF"
            - "HHMMSSF"
            - "HHMMSS"
            - "HHMM"
            - "HH"
         Important is number of digits.
      HB_TSTOSTR( <tTimeStamp> ) -> <cTimeStamp> // YYYY-MM-DD HH:MM:SS.fff
      HB_STRTOTS( <cTimeStamp> ) -> <tTimeStamp>
         <cTimeStamp> should be in one of the above form:
            YYYY-MM-DD [H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
            YYYY-MM-DDT[H[H][:M[M][:S[S][.f[f[f[f]]]]]]] [PM|AM]
         The folowing characters can be used as date delimiters: "-", "/", "."
         T - is literal "T" - it's for XML timestamp format
         if PM or AM is used HH is in range < 1 : 12 > otherwise
         in range < 0 : 23 >
      HB_HOUR( <tTimeStamp> ) -> <nHour>
      HB_MINUTE( <tTimeStamp> ) -> <nMinute>
      HB_SEC( <tTimeStamp> ) -> <nSeconds>   // with milliseconds

  * harbour/source/rtl/datec.c
    + accept timestamp parameters in CMONTH() and CDOW() functions

  * harbour/source/rtl/empty.c
    + added support for timestamp items

  * harbour/source/rtl/itemseri.c
    + added support for timestamp items serialization

  * harbour/source/rtl/minmax.c
    + added support for timestamp values to MIN() and MAX() functions.
      when only one of given parameters is timestamp value and other
      is date value and date parts are equal then always date item
      is returned as both MIN() or MAX() value.

  * harbour/source/rtl/dates.c
    + added new C functions: hb_timeFormat(), hb_timeUnformat(),
      hb_timeStampFormat(), hb_timeStampUnformat()

  * harbour/source/rtl/valtype.c
    + added .prg functions: HB_ISDATETIME(), HB_ISTIMESTAMP()

  * harbour/source/rtl/transfrm.c
    + added support for timestamp items formatting.
    + added new function modifier @T.
      When @T is used without @D then only time part of timestamp value
      is formatted and return.
      When @D is used without @T then only date part of timestamp value
      is formatted and return.

  * harbour/source/rtl/tbrowse.prg
    + display timestamp values

  * harbour/source/rtl/philes.c
    + accept timestamp value as second parameter of HB_FSETDATETIME()
      function
    + store file data and time in second parameter of HB_FGETDATETIME()
      as timestamp value.
    Old parameters (2-dDate, 3-cTime) are still supported but please think
    about removing them - they are redundant.

  * harbour/source/rtl/filesys.c
    * updated function names


  * harbour/source/rdd/dbf1.c
    + added native support for time and timestamp fields

  * harbour/include/hbrddcdx.h
  * harbour/include/hbrddnsx.h
  * harbour/source/rdd/dbfntx/dbfntx1.c
  * harbour/source/rdd/dbfcdx/dbfcdx1.c
  * harbour/source/rdd/dbfnsx/dbfnsx1.c
  * harbour/source/rdd/dbffpt/dbffpt1.c
    + added support for indexing timestamp fields
    + added support for using DATE values with timestamp fields
      which replicate HVM behavior.
      SEEK and SEEKLAST with date value when active index is on
      timestamp positions to 1-st or last record where date part
      of indexed timesamp value is equal.
      Settings scopes to date values when active index is on timestamp
      value reduce the visible record range to these ones which have
      date part of timestamp value in the range of dates values used
      for scopes. It possible to mix date and timestamp values in scope
      and set one scope to date value and the second to timesamp.

  * harbour/source/rdd/sdf1.c
  * harbour/source/rdd/delim1.c
    + added support for exporting timestamp fields

  * harbour/source/rdd/dbsql.c
    ! fixed typo in logical value export
    + export timestamp fields.
      Please update the format to given SQL syntax.


  * harbour/contrib/hbct/files.c
    + changed SETFDATI() to optionally accept timestamp parameter
      instead of two parameters dDate and cTime

  * harbour/contrib/hbct/misc1.c
    + added timestamp support to XTOC() function

  * harbour/contrib/hbct/misc2.c
    + added timestamp support to COMPLEMENT() function

  * harbour/contrib/hbct/dattime2.c
    + accept timestamp values in ADDMONTH(), DOY(), ISLEAP(), QUARTER()
      LASTDAYOM(), WEEK() functions

  * harbour/contrib/hbmzip/hbmzip.c
    + updated HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
      functions to optionaly accept timestamp value in 3-rd parameter
      instead od dDate, and cTime in 3-rd and 4-th parameters.
    + updated HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
      to return timestamp value in 3-rd parameter instead of date value.
      TODO: Please think about removing 4-th parameter from:
               HB_ZipFileCreate( hZip, cZipName, tDateTime, cTime, ... )
               HB_UnzipFileInfo( hUnzip, @cZipName, @tDateTime, @cTime, ... )
            Now it's redundant.
  * harbour/contrib/hbmzip/readme.txt
    * updated parameters description for above functions

  * harbour/contrib/hbnf/descendn.c
    + added timestamp support to FT_DESCEND() function

  * harbour/contrib/hbclipsm/date.c
    + accept timestamp values in DATEASAGE(), DATEASARRAY() and DATEISLEAP()
      functions

  * harbour/contrib/hbmisc/dates2.c
    + accept timestamp values in ISLEAPYEAR(), DAYSINMONTH(), EOM(), BOM(),
      WOM(), WOY(), EOY() and BOY() functions


   The following contrib files should be updated but I'm leaving it to
   other developers who want to keep this code alive:
         contrib/hbtip/utils.c
         contrib/hbvpdf/hbvpdf.prg
         contrib/hbvpdf/hbvpdft.prg
         contrib/hbwin/win_dll.c
            some minor cleanups if necessary and authors will find
            timestamp values usable

         contrib/hbole/ole2.c
         contrib/hbwin/win_ole.c
            add support for timestamp values in OLE

         contrib/rddado/adordd.prg
         contrib/rddads/ads1.c
         contrib/rddads/adsx.c
         contrib/rddsql/...
            add support for timestamp values in RDDs

   Warning: this implementation is not xHarbour compatible. There are many
   important differences. Mostly on C level and used API. Please be careful
   in porting xHarbour source code to Harbour.
2009-03-21 15:04:43 +00:00

3553 lines
121 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Substitute the variable and function names. */
#define yyparse hb_macroparse
#define yylex hb_macrolex
#define yyerror hb_macroerror
#define yylval hb_macrolval
#define yychar hb_macrochar
#define yydebug hb_macrodebug
#define yynerrs hb_macronerrs
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
IDENTIFIER = 258,
NIL = 259,
NUM_DOUBLE = 260,
INASSIGN = 261,
NUM_LONG = 262,
NUM_DATE = 263,
TIMESTAMP = 264,
IIF = 265,
LITERAL = 266,
TRUEVALUE = 267,
FALSEVALUE = 268,
AND = 269,
OR = 270,
NOT = 271,
EQ = 272,
NE1 = 273,
NE2 = 274,
INC = 275,
DEC = 276,
ALIASOP = 277,
HASHOP = 278,
SELF = 279,
LE = 280,
GE = 281,
FIELD = 282,
MACROVAR = 283,
MACROTEXT = 284,
PLUSEQ = 285,
MINUSEQ = 286,
MULTEQ = 287,
DIVEQ = 288,
POWER = 289,
EXPEQ = 290,
MODEQ = 291,
EPSILON = 292,
POST = 293,
UNARY = 294,
PRE = 295
};
#endif
/* Tokens. */
#define IDENTIFIER 258
#define NIL 259
#define NUM_DOUBLE 260
#define INASSIGN 261
#define NUM_LONG 262
#define NUM_DATE 263
#define TIMESTAMP 264
#define IIF 265
#define LITERAL 266
#define TRUEVALUE 267
#define FALSEVALUE 268
#define AND 269
#define OR 270
#define NOT 271
#define EQ 272
#define NE1 273
#define NE2 274
#define INC 275
#define DEC 276
#define ALIASOP 277
#define HASHOP 278
#define SELF 279
#define LE 280
#define GE 281
#define FIELD 282
#define MACROVAR 283
#define MACROTEXT 284
#define PLUSEQ 285
#define MINUSEQ 286
#define MULTEQ 287
#define DIVEQ 288
#define POWER 289
#define EXPEQ 290
#define MODEQ 291
#define EPSILON 292
#define POST 293
#define UNARY 294
#define PRE 295
/* Copy the first part of user declarations. */
#line 6 "macro.y"
/*
* $Id$
*/
/*
* Harbour Project source code:
* Macro compiler YACC rules and actions
*
* Copyright 1999 Antonio Linares <alinares@fivetech.com>
* www - http://www.harbour-project.org
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this software; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
*
* As a special exception, the Harbour Project gives permission for
* additional uses of the text contained in its release of Harbour.
*
* The exception is that, if you link the Harbour libraries with other
* files to produce an executable, this does not by itself cause the
* resulting executable to be covered by the GNU General Public License.
* Your use of that executable is in no way restricted on account of
* linking the Harbour library code into it.
*
* This exception does not however invalidate any other reasons why
* the executable file might be covered by the GNU General Public License.
*
* This exception applies only to the code released by the Harbour
* Project under the name Harbour. If you copy code from other
* Harbour Project or Free Software Foundation releases into a copy of
* Harbour, as the General Public License permits, the exception does
* not apply to the code that you add in this way. To avoid misleading
* anyone as to the status of such modified files, you must delete
* this exception notice from them.
*
* If you write modifications of your own for Harbour, it is your choice
* whether to permit this exception to apply to your modifications.
* If you do not wish that, delete this exception notice.
*
*/
/* TODO list
* 1) Change the pcode generated by ::cVar from Self:cVar to QSELF():cVar
* The major problem to solve is how to support QSELF() inside a codeblock.
*/
/* this #define HAVE TO be placed before all #include directives
*/
#define HB_MACRO_SUPPORT
#include "hbmacro.h"
#include "hbcomp.h"
#include "hbdate.h"
#include "hbpp.h"
/* Compile using: bison -d -p hb_comp macro.y */
/* to pacify some warnings in BCC */
#if defined( __BORLANDC__ ) && !defined( __STDC__ )
# define __STDC__
#endif
#undef alloca
#define alloca hb_xgrab
#undef malloc
#define malloc hb_xgrab
#undef realloc
#define realloc hb_xrealloc
#undef free
#define free hb_xfree
/* NOTE: these symbols are used internally in bison.simple
*/
#undef YYFREE
#define YYFREE hb_xfree
#undef YYMALLOC
#define YYMALLOC hb_xgrab
#define NO_YYERROR
/* yacc/lex related definitions
*/
/* Standard checking for valid expression creation
*/
#define HB_MACRO_CHECK( pExpr ) \
if( ! ( HB_MACRO_DATA->status & HB_MACRO_CONT ) ) \
{ \
YYABORT; \
}
#define HB_MACRO_IFENABLED( pSet, pExpr, flag ) \
if( HB_MACRO_DATA->supported & (flag) ) \
{ \
pSet = (pExpr); \
}\
else \
{ \
YYABORT; \
}
#if defined( __BORLANDC__ ) || defined( __WATCOMC__ )
/* The if() inside this macro is always TRUE but it's used to hide BCC warning */
#define HB_MACRO_ABORT if( !( HB_MACRO_DATA->status & HB_MACRO_CONT ) ) { YYABORT; }
#else
#define HB_MACRO_ABORT { YYABORT; }
#endif
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 130 "macro.y"
{
const char * string; /* to hold a string returned by lex */
int iNumber; /* to hold a temporary integer number */
HB_LONG lNumber; /* to hold a temporary long number */
void * pVoid; /* to hold any memory structure we may need */
HB_EXPR_PTR asExpr;
struct
{
const char * string;
int length;
} valChar;
struct
{
int iNumber; /* to hold a number returned by lex */
} valInteger;
struct
{
HB_LONG lNumber; /* to hold a long number returned by lex */
UCHAR bWidth; /* to hold the width of the value */
} valLong;
struct
{
double dNumber; /* to hold a double number returned by lex */
UCHAR bWidth; /* to hold the width of the value */
UCHAR bDec; /* to hold the number of decimal points in the value */
} valDouble;
struct
{
long date; /* to hold julian date */
long time; /* to hold milliseconds */
} valTimeStamp;
}
/* Line 187 of yacc.c. */
#line 340 "macroy.c"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
#line 163 "macro.y"
/* This must be placed after the above union - the union is
* typedef-ined to YYSTYPE
*/
extern int yylex( YYSTYPE *, HB_MACRO_PTR ); /* main lex token function, called by yyparse() */
extern int yyparse( HB_MACRO_PTR ); /* main yacc parsing function */
extern void yyerror( HB_MACRO_PTR, const char * ); /* parsing error management function */
static void hb_macroIdentNew( HB_COMP_DECL, char * );
/* Line 216 of yacc.c. */
#line 364 "macroy.c"
#ifdef short
# undef short
#endif
#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# endif
#endif
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
#else
static int
YYID (i)
int i;
#endif
{
return i;
}
#endif
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# define YYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 102
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 1264
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 62
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 69
/* YYNRULES -- Number of rules. */
#define YYNRULES 229
/* YYNRULES -- Number of states. */
#define YYNSTATES 340
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 295
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const yytype_uint8 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
53, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 42, 47, 50, 2,
56, 57, 45, 43, 52, 44, 2, 46, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 58, 2,
40, 39, 41, 2, 51, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 60, 2, 59, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 54, 61, 55, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
35, 36, 37, 38, 48, 49
};
#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
YYRHS. */
static const yytype_uint16 yyprhs[] =
{
0, 0, 3, 6, 8, 10, 13, 15, 17, 19,
21, 23, 26, 28, 30, 32, 34, 36, 40, 43,
47, 51, 55, 61, 63, 66, 68, 70, 73, 76,
79, 82, 86, 89, 92, 95, 98, 101, 103, 105,
108, 111, 114, 117, 120, 123, 126, 129, 132, 135,
138, 141, 144, 147, 150, 153, 156, 159, 162, 165,
168, 171, 174, 177, 180, 183, 186, 189, 192, 195,
198, 203, 208, 214, 216, 220, 222, 224, 227, 230,
233, 236, 239, 241, 243, 247, 251, 255, 260, 262,
264, 266, 268, 270, 272, 274, 276, 278, 280, 282,
284, 286, 288, 290, 292, 294, 296, 298, 300, 302,
304, 306, 308, 310, 312, 314, 316, 318, 320, 322,
324, 326, 328, 329, 334, 336, 340, 341, 343, 345,
347, 349, 351, 353, 355, 357, 359, 361, 363, 365,
367, 369, 371, 373, 375, 377, 379, 381, 383, 385,
387, 389, 391, 394, 397, 400, 403, 406, 409, 413,
417, 421, 425, 429, 433, 437, 441, 445, 449, 453,
457, 461, 465, 469, 473, 477, 481, 485, 489, 493,
497, 501, 505, 509, 513, 517, 521, 523, 525, 527,
529, 531, 533, 537, 541, 545, 549, 553, 557, 561,
565, 569, 573, 577, 581, 585, 589, 593, 597, 601,
604, 607, 611, 616, 618, 622, 623, 631, 633, 637,
638, 640, 642, 646, 648, 652, 655, 659, 662, 665
};
/* YYRHS -- A `-1'-separated list of the rules' RHS. */
static const yytype_int16 yyrhs[] =
{
63, 0, -1, 97, 53, -1, 97, -1, 101, -1,
97, 1, -1, 1, -1, 5, -1, 7, -1, 8,
-1, 9, -1, 7, 22, -1, 4, -1, 11, -1,
12, -1, 13, -1, 24, -1, 54, 121, 55, -1,
72, 119, -1, 54, 23, 55, -1, 54, 75, 55,
-1, 97, 23, 102, -1, 75, 52, 97, 23, 102,
-1, 3, -1, 3, 22, -1, 28, -1, 29, -1,
78, 22, -1, 50, 128, -1, 80, 22, -1, 27,
22, -1, 27, 22, 82, -1, 82, 77, -1, 82,
67, -1, 82, 129, -1, 82, 79, -1, 82, 81,
-1, 3, -1, 78, -1, 67, 84, -1, 79, 84,
-1, 81, 84, -1, 129, 84, -1, 77, 84, -1,
82, 84, -1, 83, 84, -1, 67, 128, -1, 77,
128, -1, 79, 128, -1, 81, 128, -1, 129, 128,
-1, 64, 119, -1, 68, 119, -1, 65, 119, -1,
66, 119, -1, 69, 119, -1, 122, 119, -1, 70,
119, -1, 74, 119, -1, 71, 119, -1, 76, 119,
-1, 85, 119, -1, 86, 119, -1, 78, 119, -1,
80, 119, -1, 94, 119, -1, 95, 119, -1, 88,
119, -1, 130, 119, -1, 128, 119, -1, 3, 56,
90, 57, -1, 78, 56, 90, 57, -1, 51, 3,
56, 90, 57, -1, 93, -1, 90, 52, 93, -1,
102, -1, 92, -1, 51, 3, -1, 51, 78, -1,
51, 85, -1, 51, 94, -1, 51, 87, -1, 37,
-1, 91, -1, 103, 58, 3, -1, 103, 58, 78,
-1, 103, 58, 80, -1, 94, 56, 90, 57, -1,
64, -1, 68, -1, 65, -1, 66, -1, 69, -1,
122, -1, 70, -1, 71, -1, 72, -1, 73, -1,
74, -1, 85, -1, 86, -1, 78, -1, 80, -1,
76, -1, 87, -1, 88, -1, 130, -1, 94, -1,
95, -1, 108, -1, 115, -1, 105, -1, 106, -1,
107, -1, 116, -1, 117, -1, 118, -1, 89, -1,
96, -1, 128, -1, 37, -1, 97, -1, -1, 102,
52, 100, 102, -1, 99, -1, 101, 52, 102, -1,
-1, 97, -1, 64, -1, 68, -1, 65, -1, 66,
-1, 69, -1, 122, -1, 70, -1, 71, -1, 72,
-1, 73, -1, 74, -1, 85, -1, 86, -1, 78,
-1, 80, -1, 76, -1, 87, -1, 128, -1, 88,
-1, 130, -1, 94, -1, 95, -1, 20, -1, 21,
-1, 103, 104, -1, 20, 97, -1, 21, 97, -1,
16, 97, -1, 44, 97, -1, 43, 97, -1, 64,
6, 97, -1, 68, 6, 97, -1, 65, 6, 97,
-1, 66, 6, 97, -1, 69, 6, 97, -1, 122,
6, 97, -1, 70, 6, 97, -1, 71, 6, 97,
-1, 72, 6, 97, -1, 73, 6, 97, -1, 74,
6, 97, -1, 85, 6, 97, -1, 86, 6, 97,
-1, 78, 6, 97, -1, 80, 6, 97, -1, 76,
6, 97, -1, 87, 6, 97, -1, 128, 6, 97,
-1, 88, 6, 97, -1, 130, 6, 97, -1, 94,
6, 97, -1, 95, 6, 97, -1, 103, 30, 97,
-1, 103, 31, 97, -1, 103, 32, 97, -1, 103,
33, 97, -1, 103, 36, 97, -1, 103, 35, 97,
-1, 109, -1, 110, -1, 111, -1, 112, -1, 113,
-1, 114, -1, 97, 43, 97, -1, 97, 44, 97,
-1, 97, 45, 97, -1, 97, 46, 97, -1, 97,
47, 97, -1, 97, 34, 97, -1, 97, 14, 97,
-1, 97, 15, 97, -1, 97, 17, 97, -1, 97,
40, 97, -1, 97, 41, 97, -1, 97, 25, 97,
-1, 97, 26, 97, -1, 97, 18, 97, -1, 97,
19, 97, -1, 97, 42, 97, -1, 97, 39, 97,
-1, 120, 59, -1, 60, 98, -1, 120, 52, 98,
-1, 120, 59, 60, 98, -1, 93, -1, 121, 52,
93, -1, -1, 54, 61, 123, 125, 61, 124, 55,
-1, 97, -1, 124, 52, 97, -1, -1, 37, -1,
126, -1, 126, 52, 37, -1, 3, -1, 126, 52,
3, -1, 56, 102, -1, 127, 52, 102, -1, 127,
57, -1, 128, 22, -1, 10, 56, 97, 52, 91,
52, 91, 57, -1
};
/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
static const yytype_uint16 yyrline[] =
{
0, 248, 248, 257, 265, 273, 278, 287, 288, 291,
294, 297, 302, 307, 312, 313, 318, 323, 328, 333,
334, 337, 338, 344, 347, 352, 355, 374, 379, 382,
389, 390, 395, 396, 397, 398, 399, 402, 403, 406,
407, 408, 409, 410, 411, 412, 421, 422, 423, 424,
425, 430, 431, 432, 433, 434, 435, 436, 437, 438,
439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
453, 456, 461, 471, 472, 475, 476, 479, 480, 481,
482, 483, 486, 487, 492, 493, 494, 499, 503, 504,
505, 506, 507, 508, 509, 510, 511, 512, 513, 514,
515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
525, 526, 527, 528, 529, 530, 531, 532, 535, 536,
539, 540, 543, 543, 557, 558, 562, 563, 566, 567,
568, 569, 570, 571, 572, 573, 574, 575, 576, 577,
578, 579, 580, 581, 582, 583, 584, 585, 586, 587,
593, 594, 600, 603, 604, 607, 608, 609, 612, 613,
614, 615, 616, 617, 618, 619, 620, 621, 622, 623,
624, 625, 626, 627, 628, 629, 630, 631, 632, 633,
636, 639, 642, 645, 648, 651, 654, 655, 656, 657,
658, 659, 662, 663, 664, 665, 666, 667, 670, 671,
674, 675, 676, 677, 678, 679, 680, 681, 682, 685,
691, 692, 693, 696, 697, 701, 700, 708, 709, 714,
715, 716, 717, 720, 721, 724, 725, 728, 731, 735
};
#endif
#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
"$end", "error", "$undefined", "IDENTIFIER", "NIL", "NUM_DOUBLE",
"INASSIGN", "NUM_LONG", "NUM_DATE", "TIMESTAMP", "IIF", "LITERAL",
"TRUEVALUE", "FALSEVALUE", "AND", "OR", "NOT", "EQ", "NE1", "NE2", "INC",
"DEC", "ALIASOP", "HASHOP", "SELF", "LE", "GE", "FIELD", "MACROVAR",
"MACROTEXT", "PLUSEQ", "MINUSEQ", "MULTEQ", "DIVEQ", "POWER", "EXPEQ",
"MODEQ", "EPSILON", "POST", "'='", "'<'", "'>'", "'$'", "'+'", "'-'",
"'*'", "'/'", "'%'", "UNARY", "PRE", "'&'", "'@'", "','", "'\\n'", "'{'",
"'}'", "'('", "')'", "':'", "']'", "'['", "'|'", "$accept", "Main",
"NumValue", "DateValue", "TimeStampValue", "NumAlias", "NilValue",
"LiteralValue", "Logical", "SelfValue", "Array", "ArrayAt", "Hash",
"HashList", "Variable", "VarAlias", "MacroVar", "MacroVarAlias",
"MacroExpr", "MacroExprAlias", "FieldAlias", "FieldVarAlias", "AliasId",
"AliasVar", "AliasExpr", "VariableAt", "FunCall", "FunRef", "ArgList",
"Argument", "RefArgument", "ExtArgument", "ObjectData", "ObjectMethod",
"SimpleExpression", "Expression", "ExtExpression", "RootParamList", "@1",
"AsParamList", "EmptyExpression", "LeftExpression", "PostOp",
"ExprPostOp", "ExprPreOp", "ExprUnary", "ExprAssign", "ExprPlusEq",
"ExprMinusEq", "ExprMultEq", "ExprDivEq", "ExprModEq", "ExprExpEq",
"ExprOperEq", "ExprMath", "ExprBool", "ExprRelation", "ArrayIndex",
"IndexList", "ElemList", "CodeBlock", "@2", "BlockExpList", "BlockVars",
"BlockVarList", "ExpList", "PareExpList", "PareExpListAlias", "IfInline", 0
};
#endif
# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
token YYLEX-NUM. */
static const yytype_uint16 yytoknum[] =
{
0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
285, 286, 287, 288, 289, 290, 291, 292, 293, 61,
60, 62, 36, 43, 45, 42, 47, 37, 294, 295,
38, 64, 44, 10, 123, 125, 40, 41, 58, 93,
91, 124
};
# endif
/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
static const yytype_uint8 yyr1[] =
{
0, 62, 63, 63, 63, 63, 63, 64, 64, 65,
66, 67, 68, 69, 70, 70, 71, 72, 73, 74,
74, 75, 75, 76, 77, 78, 78, 79, 80, 81,
82, 82, 83, 83, 83, 83, 83, 84, 84, 85,
85, 85, 85, 85, 85, 85, 86, 86, 86, 86,
86, 87, 87, 87, 87, 87, 87, 87, 87, 87,
87, 87, 87, 87, 87, 87, 87, 87, 87, 87,
88, 88, 89, 90, 90, 91, 91, 92, 92, 92,
92, 92, 93, 93, 94, 94, 94, 95, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 96, 96,
96, 96, 96, 96, 96, 96, 96, 96, 97, 97,
98, 98, 100, 99, 101, 101, 102, 102, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
103, 103, 103, 103, 103, 103, 103, 103, 103, 103,
104, 104, 105, 106, 106, 107, 107, 107, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
108, 108, 108, 108, 108, 108, 108, 108, 108, 108,
109, 110, 111, 112, 113, 114, 115, 115, 115, 115,
115, 115, 116, 116, 116, 116, 116, 116, 117, 117,
118, 118, 118, 118, 118, 118, 118, 118, 118, 119,
120, 120, 120, 121, 121, 123, 122, 124, 124, 125,
125, 125, 125, 126, 126, 127, 127, 128, 129, 130
};
/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
static const yytype_uint8 yyr2[] =
{
0, 2, 2, 1, 1, 2, 1, 1, 1, 1,
1, 2, 1, 1, 1, 1, 1, 3, 2, 3,
3, 3, 5, 1, 2, 1, 1, 2, 2, 2,
2, 3, 2, 2, 2, 2, 2, 1, 1, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
4, 4, 5, 1, 3, 1, 1, 2, 2, 2,
2, 2, 1, 1, 3, 3, 3, 4, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 0, 4, 1, 3, 0, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 2, 2, 2, 2, 2, 2, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 1, 1, 1, 1,
1, 1, 3, 3, 3, 3, 3, 3, 3, 3,
3, 3, 3, 3, 3, 3, 3, 3, 3, 2,
2, 3, 4, 1, 3, 0, 7, 1, 3, 0,
1, 1, 3, 1, 3, 2, 3, 2, 2, 8
};
/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
STATE-NUM when YYTABLE doesn't specify something else to do. Zero
means the default is an error. */
static const yytype_uint8 yydefact[] =
{
0, 6, 23, 12, 7, 8, 9, 10, 0, 13,
14, 15, 0, 0, 0, 16, 0, 25, 26, 0,
0, 0, 0, 126, 126, 0, 88, 90, 91, 0,
89, 92, 94, 95, 96, 97, 98, 103, 0, 101,
0, 102, 0, 0, 0, 99, 100, 104, 105, 117,
107, 108, 118, 0, 124, 4, 0, 0, 111, 112,
113, 109, 186, 187, 188, 189, 190, 191, 110, 114,
115, 116, 93, 0, 119, 0, 106, 24, 126, 11,
0, 155, 153, 154, 30, 157, 156, 28, 0, 0,
82, 0, 215, 0, 83, 76, 213, 127, 75, 0,
127, 225, 1, 0, 0, 51, 0, 0, 53, 0,
54, 37, 38, 39, 46, 0, 52, 0, 55, 0,
57, 0, 59, 0, 18, 0, 0, 58, 0, 60,
43, 47, 0, 27, 126, 63, 40, 48, 0, 29,
64, 41, 49, 37, 0, 33, 32, 38, 35, 0,
36, 44, 0, 34, 45, 0, 61, 0, 62, 0,
0, 67, 0, 126, 65, 0, 66, 5, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 2, 126, 122, 150, 151,
0, 0, 0, 0, 0, 0, 0, 152, 0, 56,
126, 227, 0, 228, 69, 42, 50, 0, 68, 0,
73, 0, 31, 126, 19, 77, 128, 130, 131, 129,
132, 134, 135, 136, 137, 138, 143, 78, 142, 79,
140, 81, 146, 80, 149, 0, 133, 145, 147, 219,
0, 20, 126, 126, 17, 158, 120, 121, 210, 0,
209, 160, 161, 159, 162, 164, 165, 166, 167, 168,
173, 171, 0, 172, 169, 170, 174, 176, 178, 0,
179, 198, 199, 200, 205, 206, 203, 204, 197, 208,
201, 202, 207, 192, 193, 194, 195, 196, 125, 126,
180, 181, 182, 183, 185, 184, 84, 85, 86, 163,
226, 175, 177, 126, 70, 126, 0, 126, 223, 220,
0, 221, 0, 21, 214, 211, 0, 71, 87, 123,
74, 0, 72, 0, 0, 0, 126, 212, 126, 72,
217, 0, 224, 222, 22, 0, 0, 216, 229, 218
};
/* YYDEFGOTO[NTERM-NUM]. */
static const yytype_int16 yydefgoto[] =
{
-1, 25, 26, 27, 28, 29, 30, 31, 32, 33,
34, 35, 36, 93, 37, 38, 39, 40, 41, 42,
43, 44, 113, 45, 46, 47, 48, 49, 209, 94,
95, 210, 50, 51, 52, 100, 248, 54, 289, 55,
98, 57, 197, 58, 59, 60, 61, 62, 63, 64,
65, 66, 67, 68, 69, 70, 71, 105, 106, 99,
72, 239, 331, 310, 311, 73, 74, 75, 76
};
/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
STATE-NUM. */
#define YYPACT_NINF -270
static const yytype_int16 yypact[] =
{
350, -270, -14, -270, -270, -16, -270, -270, -46, -270,
-270, -270, 846, 846, 846, -270, 9, -270, -270, 846,
846, -18, 44, 291, 846, 39, -3, 459, 476, 6,
493, 510, 527, 544, 561, 1006, 578, 595, 6, 377,
6, 408, 6, 85, 62, 612, 629, 1023, 646, -270,
425, 663, -270, 945, -270, 27, 33, 848, -270, -270,
-270, -270, -270, -270, -270, -270, -270, -270, -270, -270,
-270, -270, 680, -31, 442, 6, 697, -270, 738, -270,
846, 1217, -270, -270, 34, -270, -270, -270, 4, 51,
-270, 996, -270, 84, -270, -270, -270, 1084, -270, 112,
1152, -270, -270, 846, 792, -270, 59, 846, -270, 846,
-270, -270, -270, -270, -270, 846, -270, 846, -270, 846,
-270, 846, -270, 846, -270, 846, 846, -270, 846, -270,
-270, -270, 846, -270, 738, -270, -270, -270, 846, -270,
-270, -270, -270, 67, -16, -270, -270, 94, -270, 98,
-270, -270, 131, -270, -270, 846, -270, 846, -270, 846,
846, -270, 846, 738, -270, 846, -270, -270, 846, 846,
846, 846, 846, 846, 846, 846, 846, 846, 846, 846,
846, 846, 846, 846, 846, -270, 846, -270, -270, -270,
846, 846, 846, 846, 846, 846, 102, -270, 846, -270,
846, -270, 846, -270, -270, -270, -270, 846, -270, 70,
-270, 1048, -270, 738, -270, -15, 125, 125, 125, 125,
125, 125, 125, 125, -270, 125, 125, 18, -11, 82,
125, 96, 125, 37, 125, 105, 125, -6, 125, 19,
846, -270, 846, 738, -270, 1152, -270, 1152, -270, 792,
136, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152, 1152,
1152, 1152, 72, 1152, 1152, 1152, 1152, 1152, 1152, 99,
1152, 1186, 1152, 1217, 1217, 1217, 183, 183, 165, 1217,
183, 183, 183, 100, 100, 103, 103, 103, -270, 846,
1152, 1152, 1152, 1152, 1152, 1152, -270, -270, -270, 1152,
-270, 1152, 1152, 738, -270, 900, 109, 738, -270, -270,
139, 151, 1118, -270, -270, -270, 792, -270, -270, -270,
-270, 161, -270, 154, 846, 21, 846, -270, 900, 152,
1152, 134, -270, -270, -270, 158, 846, -270, -270, 1152
};
/* YYPGOTO[NTERM-NUM]. */
static const yytype_int16 yypgoto[] =
{
-270, -270, 129, 130, 140, 189, 142, 143, 144, 145,
146, 147, 148, -270, 150, 199, 8, 201, -38, 202,
162, -270, 58, 156, 157, 159, 169, -270, -119, -269,
-270, -21, 180, 184, -270, 0, -245, -270, -270, -270,
1, 185, -270, -270, -270, -270, -270, -270, -270, -270,
-270, -270, -270, -270, -270, -270, -270, 36, -270, -270,
186, -270, -270, -270, -270, -270, 176, 209, 187
};
/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
positive, shift that token. If negative, reduce the rule which
number is the opposite. If zero, do what YYDEFACT says.
If YYTABLE_NINF, syntax error. */
#define YYTABLE_NINF -150
static const yytype_int16 yytable[] =
{
53, 56, 96, 103, 315, 149, 79, 77, 77, 111,
80, 139, 81, 82, 83, 262, 203, -128, -128, 85,
86, 200, 308, 97, 332, 101, 201, -128, -128, -128,
-128, 84, -128, -128, 17, 18, 321, 112, 24, 102,
133, 307, 78, -23, 269, -23, 112, 88, 112, 104,
112, 147, 112, 228, 104, -128, 309, 104, 333, 335,
213, 16, 24, 108, 110, 111, 116, 118, 120, 122,
124, 327, 127, 129, 134, 135, -141, 140, 104, 186,
211, 156, 158, 112, 161, 187, 164, 166, 143, 77,
17, 18, 144, 163, 306, -148, 130, 104, 136, 227,
141, 151, 154, 245, 247, 296, 214, 251, 199, 252,
204, 249, 208, 17, 18, 253, 133, 254, 250, 255,
139, 256, 303, 257, 303, 258, 259, 304, 260, 317,
17, 18, 261, 205, 175, 21, 240, 175, 263, 241,
-139, 24, 104, 180, 181, 182, 183, 184, 182, 183,
184, 303, 21, 203, -144, 264, 318, 265, 298, 266,
267, 303, 268, 196, 243, 270, 322, 244, 271, 272,
273, 274, 275, 276, 277, 278, 279, 280, 281, 282,
283, 284, 285, 286, 287, 104, 336, 288, 323, 337,
290, 291, 292, 293, 294, 295, 316, 87, 299, 175,
324, 300, 301, 325, 297, 114, 303, 302, 173, 174,
-70, 329, -70, 328, 131, 338, 137, 175, 142, 152,
216, 217, 314, 177, 178, 179, 180, 181, 182, 183,
184, 218, 145, 219, 220, 221, 222, 223, 224, 225,
312, 226, 146, 313, 148, 150, 212, 229, 230, 247,
231, 206, 153, 108, 110, 116, 118, 120, 122, 124,
232, 127, 129, 135, 140, 156, 158, 237, 161, 164,
166, 233, 199, 204, 208, 234, 235, 236, 238, 0,
0, 0, 320, 0, 0, 0, 0, 0, 0, 0,
319, 0, 0, 0, 2, 3, 4, 0, 5, 6,
7, 8, 9, 10, 11, 0, 0, 12, 0, 0,
0, 13, 14, 0, 89, 15, 247, 0, 16, 17,
18, 0, 0, 0, 330, 0, 0, 334, 90, 0,
0, 0, 0, 0, 19, 20, 339, 0, 0, 0,
0, 21, 91, 0, 0, 23, 0, 24, 0, 0,
0, 1, 92, 2, 3, 4, 0, 5, 6, 7,
8, 9, 10, 11, 0, 0, 12, 0, 0, 0,
13, 14, 0, 0, 15, 0, 0, 16, 17, 18,
0, 0, 0, 132, 0, 0, 0, 0, 0, 0,
0, 0, 0, 19, 20, 0, 0, -141, -141, 133,
21, 22, -126, 0, 23, 0, 24, -141, -141, -141,
-141, 0, -141, -141, 138, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, -142, -142,
139, 162, 0, 134, 0, -141, 0, 104, -142, -142,
-142, -142, 0, -142, -142, -148, -148, 0, 202, 0,
0, 0, 0, 0, 0, -148, -148, -148, -148, 0,
-148, -148, -145, -145, 203, 107, -142, 0, 104, 0,
0, 0, -145, -145, -145, -145, 0, -145, -145, -130,
-130, 163, 109, -148, 0, 104, 0, 0, 0, -130,
-130, -130, -130, 0, -130, -130, -131, -131, 0, 115,
-145, 0, 104, 0, 0, 0, -131, -131, -131, -131,
0, -131, -131, -129, -129, 0, 117, -130, 0, 104,
0, 0, 0, -129, -129, -129, -129, 0, -129, -129,
-132, -132, 0, 119, -131, 0, 104, 0, 0, 0,
-132, -132, -132, -132, 0, -132, -132, -134, -134, 0,
121, -129, 0, 104, 0, 0, 0, -134, -134, -134,
-134, 0, -134, -134, -135, -135, 0, 123, -132, 0,
104, 0, 0, 0, -135, -135, -135, -135, 0, -135,
-135, -136, -136, 0, 126, -134, 0, 104, 0, 0,
0, -136, -136, -136, -136, 0, -136, -136, -138, -138,
0, 128, -135, 0, 104, 0, 0, 0, -138, -138,
-138, -138, 0, -138, -138, -143, -143, 0, 155, -136,
0, 104, 0, 0, 0, -143, -143, -143, -143, 0,
-143, -143, -139, -139, 0, 157, -138, 0, 104, 0,
0, 0, -139, -139, -139, -139, 0, -139, -139, -140,
-140, 0, 160, -143, 0, 104, 0, 0, 0, -140,
-140, -140, -140, 0, -140, -140, -146, -146, 0, 165,
-139, 0, 104, 0, 0, 0, -146, -146, -146, -146,
0, -146, -146, -149, -149, 0, 198, -140, 0, 104,
0, 0, 0, -149, -149, -149, -149, 0, -149, -149,
-133, -133, 0, 207, -146, 0, 104, 0, 0, 0,
-133, -133, -133, -133, 0, -133, -133, -147, -147, 0,
0, -149, 0, 104, 0, 0, 0, -147, -147, -147,
-147, 0, -147, -147, 0, 0, 0, 0, -133, 0,
104, 2, 3, 4, 0, 5, 6, 7, 8, 9,
10, 11, 0, 0, 12, -147, 0, 104, 13, 14,
0, 0, 15, 0, 0, 16, 17, 18, 0, 0,
0, 0, 0, 0, 0, 90, 0, 0, 0, 0,
0, 19, 20, 0, 0, 0, 0, 0, 21, 91,
0, 0, 23, 0, 24, 2, 3, 4, 0, 5,
6, 7, 8, 9, 10, 11, 0, 0, 12, 0,
0, 0, 13, 14, 0, 0, 15, 0, 0, 16,
17, 18, 0, 0, 0, 0, 0, 0, 0, 246,
0, 0, 0, 0, 0, 19, 20, 0, 0, 0,
0, 0, 21, 22, 0, 0, 23, 0, 24, 2,
3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
0, 0, 12, 0, 0, 0, 13, 14, 188, 189,
15, 0, 0, 16, 17, 18, 0, 0, 190, 191,
192, 193, 0, 194, 195, 0, 0, 0, 0, 19,
20, 0, 0, 0, 0, 0, 21, 22, 0, 0,
23, 0, 24, 2, 3, 4, 196, 5, 6, 7,
8, 9, 10, 11, 0, 0, 12, 0, 0, 0,
13, 14, 0, 0, 15, 0, 0, 16, 17, 18,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 19, 20, -3, 167, 0, 0, 0,
21, 91, 0, 0, 23, 0, 24, 0, 0, 168,
169, 0, 170, 171, 172, 0, 0, 0, 0, 0,
173, 174, 0, 0, 0, 0, 0, 0, 0, 175,
0, 0, 0, 0, 176, 177, 178, 179, 180, 181,
182, 183, 184, 0, 0, 0, 0, -127, 185, 215,
3, 4, 0, 5, 6, 7, 8, 9, 10, 11,
0, 0, 125, 0, 0, 0, 0, 0, 0, 0,
15, 0, 0, 16, 17, 18, -137, -137, 0, 159,
0, 0, 0, 0, 0, 0, -137, -137, -137, -137,
0, -137, -137, -144, -144, 0, 21, 0, 0, 0,
23, 0, 24, -144, -144, -144, -144, 0, -144, -144,
0, 0, 168, 169, -137, 170, 171, 172, 0, 0,
0, 0, 0, 173, 174, 0, 0, 0, 0, 0,
0, -144, 175, 0, 0, 0, 0, 176, 177, 178,
179, 180, 181, 182, 183, 184, 0, 0, 168, 169,
305, 170, 171, 172, 0, 0, 0, 242, 0, 173,
174, 0, 0, 0, 0, 0, 0, 0, 175, 0,
0, 0, 0, 176, 177, 178, 179, 180, 181, 182,
183, 184, 168, 169, 0, 170, 171, 172, 0, 0,
0, 326, 0, 173, 174, 0, 0, 0, 0, 0,
0, 0, 175, 0, 0, 0, 0, 176, 177, 178,
179, 180, 181, 182, 183, 184, 168, 169, 0, 170,
171, 172, 0, 0, 0, 0, 0, 173, 174, 0,
0, 0, 0, 0, 0, 0, 175, 0, 0, 0,
0, 176, 177, 178, 179, 180, 181, 182, 183, 184,
168, 0, 0, 170, 171, 172, 0, 0, 0, 0,
0, 173, 174, 0, 0, 0, 0, 0, 0, 0,
175, 0, 0, 0, 0, 176, 177, 178, 179, 180,
181, 182, 183, 184, 170, 171, 172, 0, 0, 0,
0, 0, 173, 174, 0, 0, 0, 0, 0, 0,
0, 175, 0, 0, 0, 0, 176, 177, 178, 179,
180, 181, 182, 183, 184
};
static const yytype_int16 yycheck[] =
{
0, 0, 23, 6, 249, 43, 22, 22, 22, 3,
56, 22, 12, 13, 14, 134, 22, 20, 21, 19,
20, 52, 3, 23, 3, 24, 57, 30, 31, 32,
33, 22, 35, 36, 28, 29, 305, 29, 56, 0,
22, 56, 56, 58, 163, 60, 38, 3, 40, 60,
42, 43, 44, 91, 60, 58, 37, 60, 37, 328,
56, 27, 56, 27, 28, 3, 30, 31, 32, 33,
34, 316, 36, 37, 56, 39, 58, 41, 60, 52,
80, 45, 46, 75, 48, 52, 50, 51, 3, 22,
28, 29, 7, 56, 213, 58, 38, 60, 40, 91,
42, 43, 44, 103, 104, 3, 55, 107, 72, 109,
74, 52, 76, 28, 29, 115, 22, 117, 59, 119,
22, 121, 52, 123, 52, 125, 126, 57, 128, 57,
28, 29, 132, 75, 34, 50, 52, 34, 138, 55,
58, 56, 60, 43, 44, 45, 46, 47, 45, 46,
47, 52, 50, 22, 58, 155, 57, 157, 196, 159,
160, 52, 162, 58, 52, 165, 57, 55, 168, 169,
170, 171, 172, 173, 174, 175, 176, 177, 178, 179,
180, 181, 182, 183, 184, 60, 52, 186, 307, 55,
190, 191, 192, 193, 194, 195, 60, 21, 198, 34,
61, 200, 202, 52, 196, 29, 52, 207, 25, 26,
58, 57, 60, 52, 38, 57, 40, 34, 42, 43,
91, 91, 243, 40, 41, 42, 43, 44, 45, 46,
47, 91, 43, 91, 91, 91, 91, 91, 91, 91,
240, 91, 43, 242, 43, 43, 84, 91, 91, 249,
91, 75, 43, 217, 218, 219, 220, 221, 222, 223,
91, 225, 226, 227, 228, 229, 230, 91, 232, 233,
234, 91, 236, 237, 238, 91, 91, 91, 91, -1,
-1, -1, 303, -1, -1, -1, -1, -1, -1, -1,
289, -1, -1, -1, 3, 4, 5, -1, 7, 8,
9, 10, 11, 12, 13, -1, -1, 16, -1, -1,
-1, 20, 21, -1, 23, 24, 316, -1, 27, 28,
29, -1, -1, -1, 324, -1, -1, 326, 37, -1,
-1, -1, -1, -1, 43, 44, 336, -1, -1, -1,
-1, 50, 51, -1, -1, 54, -1, 56, -1, -1,
-1, 1, 61, 3, 4, 5, -1, 7, 8, 9,
10, 11, 12, 13, -1, -1, 16, -1, -1, -1,
20, 21, -1, -1, 24, -1, -1, 27, 28, 29,
-1, -1, -1, 6, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 43, 44, -1, -1, 20, 21, 22,
50, 51, 52, -1, 54, -1, 56, 30, 31, 32,
33, -1, 35, 36, 6, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1, 20, 21,
22, 6, -1, 56, -1, 58, -1, 60, 30, 31,
32, 33, -1, 35, 36, 20, 21, -1, 6, -1,
-1, -1, -1, -1, -1, 30, 31, 32, 33, -1,
35, 36, 20, 21, 22, 6, 58, -1, 60, -1,
-1, -1, 30, 31, 32, 33, -1, 35, 36, 20,
21, 56, 6, 58, -1, 60, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, 20, 21, -1, 6,
58, -1, 60, -1, -1, -1, 30, 31, 32, 33,
-1, 35, 36, 20, 21, -1, 6, 58, -1, 60,
-1, -1, -1, 30, 31, 32, 33, -1, 35, 36,
20, 21, -1, 6, 58, -1, 60, -1, -1, -1,
30, 31, 32, 33, -1, 35, 36, 20, 21, -1,
6, 58, -1, 60, -1, -1, -1, 30, 31, 32,
33, -1, 35, 36, 20, 21, -1, 6, 58, -1,
60, -1, -1, -1, 30, 31, 32, 33, -1, 35,
36, 20, 21, -1, 6, 58, -1, 60, -1, -1,
-1, 30, 31, 32, 33, -1, 35, 36, 20, 21,
-1, 6, 58, -1, 60, -1, -1, -1, 30, 31,
32, 33, -1, 35, 36, 20, 21, -1, 6, 58,
-1, 60, -1, -1, -1, 30, 31, 32, 33, -1,
35, 36, 20, 21, -1, 6, 58, -1, 60, -1,
-1, -1, 30, 31, 32, 33, -1, 35, 36, 20,
21, -1, 6, 58, -1, 60, -1, -1, -1, 30,
31, 32, 33, -1, 35, 36, 20, 21, -1, 6,
58, -1, 60, -1, -1, -1, 30, 31, 32, 33,
-1, 35, 36, 20, 21, -1, 6, 58, -1, 60,
-1, -1, -1, 30, 31, 32, 33, -1, 35, 36,
20, 21, -1, 6, 58, -1, 60, -1, -1, -1,
30, 31, 32, 33, -1, 35, 36, 20, 21, -1,
-1, 58, -1, 60, -1, -1, -1, 30, 31, 32,
33, -1, 35, 36, -1, -1, -1, -1, 58, -1,
60, 3, 4, 5, -1, 7, 8, 9, 10, 11,
12, 13, -1, -1, 16, 58, -1, 60, 20, 21,
-1, -1, 24, -1, -1, 27, 28, 29, -1, -1,
-1, -1, -1, -1, -1, 37, -1, -1, -1, -1,
-1, 43, 44, -1, -1, -1, -1, -1, 50, 51,
-1, -1, 54, -1, 56, 3, 4, 5, -1, 7,
8, 9, 10, 11, 12, 13, -1, -1, 16, -1,
-1, -1, 20, 21, -1, -1, 24, -1, -1, 27,
28, 29, -1, -1, -1, -1, -1, -1, -1, 37,
-1, -1, -1, -1, -1, 43, 44, -1, -1, -1,
-1, -1, 50, 51, -1, -1, 54, -1, 56, 3,
4, 5, -1, 7, 8, 9, 10, 11, 12, 13,
-1, -1, 16, -1, -1, -1, 20, 21, 20, 21,
24, -1, -1, 27, 28, 29, -1, -1, 30, 31,
32, 33, -1, 35, 36, -1, -1, -1, -1, 43,
44, -1, -1, -1, -1, -1, 50, 51, -1, -1,
54, -1, 56, 3, 4, 5, 58, 7, 8, 9,
10, 11, 12, 13, -1, -1, 16, -1, -1, -1,
20, 21, -1, -1, 24, -1, -1, 27, 28, 29,
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, 43, 44, 0, 1, -1, -1, -1,
50, 51, -1, -1, 54, -1, 56, -1, -1, 14,
15, -1, 17, 18, 19, -1, -1, -1, -1, -1,
25, 26, -1, -1, -1, -1, -1, -1, -1, 34,
-1, -1, -1, -1, 39, 40, 41, 42, 43, 44,
45, 46, 47, -1, -1, -1, -1, 52, 53, 3,
4, 5, -1, 7, 8, 9, 10, 11, 12, 13,
-1, -1, 6, -1, -1, -1, -1, -1, -1, -1,
24, -1, -1, 27, 28, 29, 20, 21, -1, 6,
-1, -1, -1, -1, -1, -1, 30, 31, 32, 33,
-1, 35, 36, 20, 21, -1, 50, -1, -1, -1,
54, -1, 56, 30, 31, 32, 33, -1, 35, 36,
-1, -1, 14, 15, 58, 17, 18, 19, -1, -1,
-1, -1, -1, 25, 26, -1, -1, -1, -1, -1,
-1, 58, 34, -1, -1, -1, -1, 39, 40, 41,
42, 43, 44, 45, 46, 47, -1, -1, 14, 15,
52, 17, 18, 19, -1, -1, -1, 23, -1, 25,
26, -1, -1, -1, -1, -1, -1, -1, 34, -1,
-1, -1, -1, 39, 40, 41, 42, 43, 44, 45,
46, 47, 14, 15, -1, 17, 18, 19, -1, -1,
-1, 23, -1, 25, 26, -1, -1, -1, -1, -1,
-1, -1, 34, -1, -1, -1, -1, 39, 40, 41,
42, 43, 44, 45, 46, 47, 14, 15, -1, 17,
18, 19, -1, -1, -1, -1, -1, 25, 26, -1,
-1, -1, -1, -1, -1, -1, 34, -1, -1, -1,
-1, 39, 40, 41, 42, 43, 44, 45, 46, 47,
14, -1, -1, 17, 18, 19, -1, -1, -1, -1,
-1, 25, 26, -1, -1, -1, -1, -1, -1, -1,
34, -1, -1, -1, -1, 39, 40, 41, 42, 43,
44, 45, 46, 47, 17, 18, 19, -1, -1, -1,
-1, -1, 25, 26, -1, -1, -1, -1, -1, -1,
-1, 34, -1, -1, -1, -1, 39, 40, 41, 42,
43, 44, 45, 46, 47
};
/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
symbol of state STATE-NUM. */
static const yytype_uint8 yystos[] =
{
0, 1, 3, 4, 5, 7, 8, 9, 10, 11,
12, 13, 16, 20, 21, 24, 27, 28, 29, 43,
44, 50, 51, 54, 56, 63, 64, 65, 66, 67,
68, 69, 70, 71, 72, 73, 74, 76, 77, 78,
79, 80, 81, 82, 83, 85, 86, 87, 88, 89,
94, 95, 96, 97, 99, 101, 102, 103, 105, 106,
107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 122, 127, 128, 129, 130, 22, 56, 22,
56, 97, 97, 97, 22, 97, 97, 128, 3, 23,
37, 51, 61, 75, 91, 92, 93, 97, 102, 121,
97, 102, 0, 6, 60, 119, 120, 6, 119, 6,
119, 3, 78, 84, 128, 6, 119, 6, 119, 6,
119, 6, 119, 6, 119, 6, 6, 119, 6, 119,
84, 128, 6, 22, 56, 119, 84, 128, 6, 22,
119, 84, 128, 3, 7, 67, 77, 78, 79, 80,
81, 84, 128, 129, 84, 6, 119, 6, 119, 6,
6, 119, 6, 56, 119, 6, 119, 1, 14, 15,
17, 18, 19, 25, 26, 34, 39, 40, 41, 42,
43, 44, 45, 46, 47, 53, 52, 52, 20, 21,
30, 31, 32, 33, 35, 36, 58, 104, 6, 119,
52, 57, 6, 22, 119, 84, 128, 6, 119, 90,
93, 97, 82, 56, 55, 3, 64, 65, 66, 68,
69, 70, 71, 72, 73, 74, 76, 78, 80, 85,
86, 87, 88, 94, 95, 103, 122, 128, 130, 123,
52, 55, 23, 52, 55, 97, 37, 97, 98, 52,
59, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 90, 97, 97, 97, 97, 97, 97, 90,
97, 97, 97, 97, 97, 97, 97, 97, 97, 97,
97, 97, 97, 97, 97, 97, 97, 97, 102, 100,
97, 97, 97, 97, 97, 97, 3, 78, 80, 97,
102, 97, 97, 52, 57, 52, 90, 56, 3, 37,
125, 126, 97, 102, 93, 98, 60, 57, 57, 102,
93, 91, 57, 90, 61, 52, 23, 98, 52, 57,
97, 124, 3, 37, 102, 91, 52, 55, 57, 97
};
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
#define YYEOF 0
#define YYACCEPT goto yyacceptlab
#define YYABORT goto yyabortlab
#define YYERROR goto yyerrorlab
/* Like YYERROR except do call yyerror. This remains here temporarily
to ease the transition to the new meaning of YYERROR, for GCC.
Once GCC version 2 has supplanted version 1, this can go. */
#define YYFAIL goto yyerrlab
#define YYRECOVERING() (!!yyerrstatus)
#define YYBACKUP(Token, Value) \
do \
if (yychar == YYEMPTY && yylen == 1) \
{ \
yychar = (Token); \
yylval = (Value); \
yytoken = YYTRANSLATE (yychar); \
YYPOPSTACK (1); \
goto yybackup; \
} \
else \
{ \
yyerror (pMacro, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (YYID (0))
#define YYTERROR 1
#define YYERRCODE 256
/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
If N is 0, then set CURRENT to the empty location which ends
the previous symbol: RHS[0] (always defined). */
#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N) \
do \
if (YYID (N)) \
{ \
(Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
(Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
(Current).last_line = YYRHSLOC (Rhs, N).last_line; \
(Current).last_column = YYRHSLOC (Rhs, N).last_column; \
} \
else \
{ \
(Current).first_line = (Current).last_line = \
YYRHSLOC (Rhs, 0).last_line; \
(Current).first_column = (Current).last_column = \
YYRHSLOC (Rhs, 0).last_column; \
} \
while (YYID (0))
#endif
/* YY_LOCATION_PRINT -- Print the location on the stream.
This macro was not mandated originally: define only if we know
we won't break user code: when these are the locations we know. */
#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
# define YY_LOCATION_PRINT(File, Loc) \
fprintf (File, "%d.%d-%d.%d", \
(Loc).first_line, (Loc).first_column, \
(Loc).last_line, (Loc).last_column)
# else
# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval, pMacro)
#endif
/* Enable debugging if requested. */
#if YYDEBUG
# ifndef YYFPRINTF
# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
# define YYFPRINTF fprintf
# endif
# define YYDPRINTF(Args) \
do { \
if (yydebug) \
YYFPRINTF Args; \
} while (YYID (0))
# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
yy_symbol_print (stderr, \
Type, Value, pMacro); \
YYFPRINTF (stderr, "\n"); \
} \
} while (YYID (0))
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, HB_MACRO_PTR pMacro)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep, pMacro)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
HB_MACRO_PTR pMacro;
#endif
{
if (!yyvaluep)
return;
YYUSE (pMacro);
# ifdef YYPRINT
if (yytype < YYNTOKENS)
YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
YYUSE (yyoutput);
# endif
switch (yytype)
{
default:
break;
}
}
/*--------------------------------.
| Print this symbol on YYOUTPUT. |
`--------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, HB_MACRO_PTR pMacro)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep, pMacro)
FILE *yyoutput;
int yytype;
YYSTYPE const * const yyvaluep;
HB_MACRO_PTR pMacro;
#endif
{
if (yytype < YYNTOKENS)
YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
yy_symbol_value_print (yyoutput, yytype, yyvaluep, pMacro);
YYFPRINTF (yyoutput, ")");
}
/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included). |
`------------------------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
yytype_int16 *bottom;
yytype_int16 *top;
#endif
{
YYFPRINTF (stderr, "Stack now");
for (; bottom <= top; ++bottom)
YYFPRINTF (stderr, " %d", *bottom);
YYFPRINTF (stderr, "\n");
}
# define YY_STACK_PRINT(Bottom, Top) \
do { \
if (yydebug) \
yy_stack_print ((Bottom), (Top)); \
} while (YYID (0))
/*------------------------------------------------.
| Report that the YYRULE is going to be reduced. |
`------------------------------------------------*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule, HB_MACRO_PTR pMacro)
#else
static void
yy_reduce_print (yyvsp, yyrule, pMacro)
YYSTYPE *yyvsp;
int yyrule;
HB_MACRO_PTR pMacro;
#endif
{
int yynrhs = yyr2[yyrule];
int yyi;
unsigned long int yylno = yyrline[yyrule];
YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
yyrule - 1, yylno);
/* The symbols being reduced. */
for (yyi = 0; yyi < yynrhs; yyi++)
{
fprintf (stderr, " $%d = ", yyi + 1);
yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
&(yyvsp[(yyi + 1) - (yynrhs)])
, pMacro);
fprintf (stderr, "\n");
}
}
# define YY_REDUCE_PRINT(Rule) \
do { \
if (yydebug) \
yy_reduce_print (yyvsp, Rule, pMacro); \
} while (YYID (0))
/* Nonzero means print parse trace. It is left uninitialized so that
multiple parsers can coexist. */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
/* YYINITDEPTH -- initial size of the parser's stacks. */
#ifndef YYINITDEPTH
# define YYINITDEPTH 200
#endif
/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
#if YYERROR_VERBOSE
# ifndef yystrlen
# if defined __GLIBC__ && defined _STRING_H
# define yystrlen strlen
# else
/* Return the length of YYSTR. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
const char *yystr;
#endif
{
YYSIZE_T yylen;
for (yylen = 0; yystr[yylen]; yylen++)
continue;
return yylen;
}
# endif
# endif
# ifndef yystpcpy
# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
# define yystpcpy stpcpy
# else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
YYDEST. */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
char *yydest;
const char *yysrc;
#endif
{
char *yyd = yydest;
const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
return yyd - 1;
}
# endif
# endif
# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
quotes and backslashes, so that it's suitable for yyerror. The
heuristic is that double-quoting is unnecessary unless the string
contains an apostrophe, a comma, or backslash (other than
backslash-backslash). YYSTR is taken from yytname. If YYRES is
null, do not copy; instead, return the length of what the result
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
if (*++yyp != '\\')
goto do_not_strip_quotes;
/* Fall through. */
default:
if (yyres)
yyres[yyn] = *yyp;
yyn++;
break;
case '"':
if (yyres)
yyres[yyn] = '\0';
return yyn;
}
do_not_strip_quotes: ;
}
if (! yyres)
return yystrlen (yystr);
return yystpcpy (yyres, yystr) - yyres;
}
# endif
/* Copy into YYRESULT an error message about the unexpected token
YYCHAR while in state YYSTATE. Return the number of bytes copied,
including the terminating null byte. If YYRESULT is null, do not
copy anything; just return the number of bytes that would be
copied. As a special case, return 0 if an ordinary "syntax error"
message will do. Return YYSIZE_MAXIMUM if overflow occurs during
size calculation. */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
int yyn = yypact[yystate];
if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
return 0;
else
{
int yytype = YYTRANSLATE (yychar);
YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
YYSIZE_T yysize = yysize0;
YYSIZE_T yysize1;
int yysize_overflow = 0;
enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
# if 0
/* This is so xgettext sees the translatable formats that are
constructed on the fly. */
YY_("syntax error, unexpected %s");
YY_("syntax error, unexpected %s, expecting %s");
YY_("syntax error, unexpected %s, expecting %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s");
YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
char *yyfmt;
char const *yyf;
static char const yyunexpected[] = "syntax error, unexpected %s";
static char const yyexpecting[] = ", expecting %s";
static char const yyor[] = " or %s";
char yyformat[sizeof yyunexpected
+ sizeof yyexpecting - 1
+ ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
* (sizeof yyor - 1))];
char const *yyprefix = yyexpecting;
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn + 1;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
int yycount = 1;
yyarg[0] = yytname[yytype];
yyfmt = yystpcpy (yyformat, yyunexpected);
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
yycount = 1;
yysize = yysize0;
yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
yyarg[yycount++] = yytname[yyx];
yysize1 = yysize + yytnamerr (0, yytname[yyx]);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
yyfmt = yystpcpy (yyfmt, yyprefix);
yyprefix = yyor;
}
yyf = YY_(yyformat);
yysize1 = yysize + yystrlen (yyf);
yysize_overflow |= (yysize1 < yysize);
yysize = yysize1;
if (yysize_overflow)
return YYSIZE_MAXIMUM;
if (yyresult)
{
/* Avoid sprintf, as that infringes on the user's name space.
Don't have undefined behavior even if the translation
produced a string with the wrong number of "%s"s. */
char *yyp = yyresult;
int yyi = 0;
while ((*yyp = *yyf) != '\0')
{
if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
{
yyp += yytnamerr (yyp, yyarg[yyi++]);
yyf += 2;
}
else
{
yyp++;
yyf++;
}
}
}
return yysize;
}
}
#endif /* YYERROR_VERBOSE */
/*-----------------------------------------------.
| Release the memory associated to this symbol. |
`-----------------------------------------------*/
/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, HB_MACRO_PTR pMacro)
#else
static void
yydestruct (yymsg, yytype, yyvaluep, pMacro)
const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
HB_MACRO_PTR pMacro;
#endif
{
YYUSE (yyvaluep);
YYUSE (pMacro);
if (!yymsg)
yymsg = "Deleting";
YYUSE (yymsg);
YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
switch (yytype)
{
default:
break;
}
}
/* Prevent warnings from -Wmissing-prototypes. */
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (HB_MACRO_PTR pMacro);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
/*----------.
| yyparse. |
`----------*/
#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
int
yyparse (HB_MACRO_PTR pMacro)
#else
int
yyparse (pMacro)
HB_MACRO_PTR pMacro;
#endif
#endif
{
/* The look-ahead symbol. */
int yychar;
/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
int yystate;
int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
/* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
#if YYERROR_VERBOSE
/* Buffer for error messages, and its allocated size. */
char yymsgbuf[128];
char *yymsg = yymsgbuf;
YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif
/* Three stacks and their tools:
`yyss': related to states,
`yyvs': related to semantic values,
`yyls': related to locations.
Refer to the stacks thru separate pointers, to allow yyoverflow
to reallocate them elsewhere. */
/* The state stack. */
yytype_int16 yyssa[YYINITDEPTH];
yytype_int16 *yyss = yyssa;
yytype_int16 *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
YYSTYPE *yyvsp;
#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
YYSIZE_T yystacksize = YYINITDEPTH;
/* The variables used to return semantic value and location from the
action routines. */
YYSTYPE yyval;
/* The number of symbols on the RHS of the reduced rule.
Keep to zero when no symbol should be popped. */
int yylen = 0;
YYDPRINTF ((stderr, "Starting parse\n"));
yystate = 0;
yyerrstatus = 0;
yynerrs = 0;
yychar = YYEMPTY; /* Cause a token to be read. */
/* Initialize stack pointers.
Waste one element of value and location stack
so that they stay on the same level as the state stack.
The wasted elements are never initialized. */
yyssp = yyss;
yyvsp = yyvs;
goto yysetstate;
/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate. |
`------------------------------------------------------------*/
yynewstate:
/* In all cases, when you get here, the value and location stacks
have just been pushed. So pushing a state here evens the stacks. */
yyssp++;
yysetstate:
*yyssp = yystate;
if (yyss + yystacksize - 1 <= yyssp)
{
/* Get the current used size of the three stacks, in elements. */
YYSIZE_T yysize = yyssp - yyss + 1;
#ifdef yyoverflow
{
/* Give user a chance to reallocate the stack. Use copies of
these so that the &'s don't force the real ones into
memory. */
YYSTYPE *yyvs1 = yyvs;
yytype_int16 *yyss1 = yyss;
/* Each stack pointer address is followed by the size of the
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
&yystacksize);
yyss = yyss1;
yyvs = yyvs1;
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
{
yytype_int16 *yyss1 = yyss;
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
YYUSE (yyptr);
# undef YYSTACK_RELOCATE
if (yyss1 != yyssa)
YYSTACK_FREE (yyss1);
}
# endif
#endif /* no yyoverflow */
yyssp = yyss + yysize - 1;
yyvsp = yyvs + yysize - 1;
YYDPRINTF ((stderr, "Stack size increased to %lu\n",
(unsigned long int) yystacksize));
if (yyss + yystacksize - 1 <= yyssp)
YYABORT;
}
YYDPRINTF ((stderr, "Entering state %d\n", yystate));
goto yybackup;
/*-----------.
| yybackup. |
`-----------*/
yybackup:
/* Do appropriate processing given the current state. Read a
look-ahead token if we need one and don't already have one. */
/* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
/* Not known => get a look-ahead token if don't already have one. */
/* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
yychar = YYLEX;
}
if (yychar <= YYEOF)
{
yychar = yytoken = YYEOF;
YYDPRINTF ((stderr, "Now at end of input.\n"));
}
else
{
yytoken = YYTRANSLATE (yychar);
YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
detect an error, take that action. */
yyn += yytoken;
if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
goto yydefault;
yyn = yytable[yyn];
if (yyn <= 0)
{
if (yyn == 0 || yyn == YYTABLE_NINF)
goto yyerrlab;
yyn = -yyn;
goto yyreduce;
}
if (yyn == YYFINAL)
YYACCEPT;
/* Count tokens shifted since error; after three, turn off error
status. */
if (yyerrstatus)
yyerrstatus--;
/* Shift the look-ahead token. */
YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the shifted token unless it is eof. */
if (yychar != YYEOF)
yychar = YYEMPTY;
yystate = yyn;
*++yyvsp = yylval;
goto yynewstate;
/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state. |
`-----------------------------------------------------------*/
yydefault:
yyn = yydefact[yystate];
if (yyn == 0)
goto yyerrlab;
goto yyreduce;
/*-----------------------------.
| yyreduce -- Do a reduction. |
`-----------------------------*/
yyreduce:
/* yyn is the number of a rule to reduce with. */
yylen = yyr2[yyn];
/* If YYLEN is nonzero, implement the default value of the action:
`$$ = $1'.
Otherwise, the following line sets YYVAL to garbage.
This behavior is undocumented and Bison
users should not rely upon it. Assigning to YYVAL
unconditionally makes the parser a bit smaller, and it avoids a
GCC warning that YYVAL may be used uninitialized. */
yyval = yyvsp[1-yylen];
YY_REDUCE_PRINT (yyn);
switch (yyn)
{
case 2:
#line 248 "macro.y"
{
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (2)].asExpr) );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_macroExprGenPush( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM );
else
hb_macroExprGenPop( (yyvsp[(1) - (2)].asExpr), HB_COMP_PARAM );
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
;}
break;
case 3:
#line 257 "macro.y"
{
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (1)].asExpr) );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_macroExprGenPush( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
else
hb_macroExprGenPop( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
;}
break;
case 4:
#line 265 "macro.y"
{
HB_MACRO_DATA->exprType = hb_compExprType( (yyvsp[(1) - (1)].asExpr) );
if( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PUSH )
hb_macroExprGenPush( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
else
hb_macroExprGenPop( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM );
hb_macroGenPCode1( HB_P_ENDPROC, HB_COMP_PARAM );
;}
break;
case 5:
#line 273 "macro.y"
{
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid expression: %s", HB_MACRO_DATA->string));
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
HB_MACRO_ABORT;
;}
break;
case 6:
#line 278 "macro.y"
{
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid syntax: %s", HB_MACRO_DATA->string));
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
HB_MACRO_ABORT;
;}
break;
case 7:
#line 287 "macro.y"
{ (yyval.asExpr) = hb_compExprNewDouble( (yyvsp[(1) - (1)].valDouble).dNumber, (yyvsp[(1) - (1)].valDouble).bWidth, (yyvsp[(1) - (1)].valDouble).bDec, HB_COMP_PARAM ); ;}
break;
case 8:
#line 288 "macro.y"
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;}
break;
case 9:
#line 291 "macro.y"
{ (yyval.asExpr) = hb_compExprNewDate( (yyvsp[(1) - (1)].valLong).lNumber, HB_COMP_PARAM ); ;}
break;
case 10:
#line 294 "macro.y"
{ (yyval.asExpr) = hb_compExprNewTimeStamp( (yyvsp[(1) - (1)].valTimeStamp).date, (yyvsp[(1) - (1)].valTimeStamp).time, HB_COMP_PARAM ); ;}
break;
case 11:
#line 297 "macro.y"
{ (yyval.asExpr) = hb_compExprNewLong( (yyvsp[(1) - (2)].valLong).lNumber, HB_COMP_PARAM ); ;}
break;
case 12:
#line 302 "macro.y"
{ (yyval.asExpr) = hb_compExprNewNil( HB_COMP_PARAM ); ;}
break;
case 13:
#line 307 "macro.y"
{ (yyval.asExpr) = hb_compExprNewString( (yyvsp[(1) - (1)].valChar).string, (yyvsp[(1) - (1)].valChar).length, FALSE, HB_COMP_PARAM ); ;}
break;
case 14:
#line 312 "macro.y"
{ (yyval.asExpr) = hb_compExprNewLogical( TRUE, HB_COMP_PARAM ); ;}
break;
case 15:
#line 313 "macro.y"
{ (yyval.asExpr) = hb_compExprNewLogical( FALSE, HB_COMP_PARAM ); ;}
break;
case 16:
#line 318 "macro.y"
{ (yyval.asExpr) = hb_compExprNewSelf( HB_COMP_PARAM ); ;}
break;
case 17:
#line 323 "macro.y"
{ (yyval.asExpr) = hb_compExprNewArray( (yyvsp[(2) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 18:
#line 328 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 19:
#line 333 "macro.y"
{ (yyval.asExpr) = hb_compExprNewHash( NULL, HB_COMP_PARAM ); ;}
break;
case 20:
#line 334 "macro.y"
{ (yyval.asExpr) = hb_compExprNewHash( (yyvsp[(2) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 21:
#line 337 "macro.y"
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 22:
#line 338 "macro.y"
{ (yyval.asExpr) = hb_compExprAddListExpr( hb_compExprAddListExpr( (yyvsp[(1) - (5)].asExpr), (yyvsp[(3) - (5)].asExpr) ), (yyvsp[(5) - (5)].asExpr) ); ;}
break;
case 23:
#line 344 "macro.y"
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string), HB_COMP_PARAM ); ;}
break;
case 24:
#line 347 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAlias( (yyvsp[(1) - (2)].string), HB_COMP_PARAM ); ;}
break;
case 25:
#line 352 "macro.y"
{ (yyval.asExpr) = hb_compExprNewMacro( NULL, '&', (yyvsp[(1) - (1)].string), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
;}
break;
case 26:
#line 355 "macro.y"
{ BOOL fNewString;
char * szVarName = hb_macroTextSymbol( (yyvsp[(1) - (1)].string), strlen( (yyvsp[(1) - (1)].string) ), &fNewString );
if( szVarName )
{
if( fNewString )
hb_macroIdentNew( HB_COMP_PARAM, szVarName );
(yyval.asExpr) = hb_compExprNewVar( szVarName, HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
}
else
{
/* invalid variable name
*/
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid variable name: %s", (yyvsp[(1) - (1)].string)));
YYABORT;
}
;}
break;
case 27:
#line 374 "macro.y"
{ hb_compExprMacroAsAlias( (yyvsp[(1) - (2)].asExpr) ); ;}
break;
case 28:
#line 379 "macro.y"
{ (yyval.asExpr) = hb_compExprNewMacro( (yyvsp[(2) - (2)].asExpr), 0, NULL, HB_COMP_PARAM ); ;}
break;
case 30:
#line 389 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAlias( "FIELD", HB_COMP_PARAM ); ;}
break;
case 31:
#line 390 "macro.y"
{ (yyval.asExpr) = (yyvsp[(3) - (3)].asExpr); ;}
break;
case 32:
#line 395 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 33:
#line 396 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 34:
#line 397 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 35:
#line 398 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 36:
#line 399 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 37:
#line 402 "macro.y"
{ (yyval.asExpr) = hb_compExprNewVar( (yyvsp[(1) - (1)].string), HB_COMP_PARAM ); ;}
break;
case 39:
#line 406 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 40:
#line 407 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 41:
#line 408 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 42:
#line 409 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 43:
#line 410 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 44:
#line 411 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 45:
#line 412 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasVar( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 46:
#line 421 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 47:
#line 422 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 48:
#line 423 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 49:
#line 424 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 50:
#line 425 "macro.y"
{ (yyval.asExpr) = hb_compExprNewAliasExpr( (yyvsp[(1) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 51:
#line 430 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 52:
#line 431 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 53:
#line 432 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 54:
#line 433 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 55:
#line 434 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 56:
#line 435 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 57:
#line 436 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 58:
#line 437 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 59:
#line 438 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 60:
#line 439 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 61:
#line 440 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 62:
#line 441 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 63:
#line 442 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 64:
#line 443 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 65:
#line 444 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 66:
#line 445 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 67:
#line 446 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 68:
#line 447 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 69:
#line 448 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 70:
#line 453 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewFunCall( hb_compExprNewFunName( (yyvsp[(1) - (4)].string), HB_COMP_PARAM ), (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
;}
break;
case 71:
#line 456 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewFunCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr), HB_COMP_PARAM );
HB_MACRO_CHECK( (yyval.asExpr) );
;}
break;
case 72:
#line 461 "macro.y"
{ if( hb_compExprParamListLen( (yyvsp[(4) - (5)].asExpr) ) != 0 )
{
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
YYABORT;
}
else
(yyval.asExpr) = hb_compExprNewFunRef( (yyvsp[(2) - (5)].string), HB_COMP_PARAM );
;}
break;
case 73:
#line 471 "macro.y"
{ (yyval.asExpr) = hb_compExprNewArgList( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM ); ;}
break;
case 74:
#line 472 "macro.y"
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 77:
#line 479 "macro.y"
{ (yyval.asExpr) = hb_compExprNewVarRef( (yyvsp[(2) - (2)].string), HB_COMP_PARAM ); ;}
break;
case 78:
#line 480 "macro.y"
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 79:
#line 481 "macro.y"
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 80:
#line 482 "macro.y"
{ (yyval.asExpr) = hb_compExprNewRef( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 81:
#line 483 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); (yyval.asExpr)->value.asList.reference = TRUE; ;}
break;
case 82:
#line 486 "macro.y"
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); ;}
break;
case 84:
#line 492 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].string), NULL, HB_COMP_PARAM ); ;}
break;
case 85:
#line 493 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), NULL, (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 86:
#line 494 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewSend( (yyvsp[(1) - (3)].asExpr), NULL, (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 87:
#line 499 "macro.y"
{ (yyval.asExpr) = hb_compExprNewMethodCall( (yyvsp[(1) - (4)].asExpr), (yyvsp[(3) - (4)].asExpr) ); ;}
break;
case 110:
#line 525 "macro.y"
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
break;
case 111:
#line 526 "macro.y"
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
break;
case 112:
#line 527 "macro.y"
{ HB_MACRO_IFENABLED( (yyval.asExpr), (yyvsp[(1) - (1)].asExpr), HB_SM_HARBOUR ); ;}
break;
case 118:
#line 535 "macro.y"
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
break;
case 119:
#line 536 "macro.y"
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
break;
case 120:
#line 539 "macro.y"
{ (yyval.asExpr) = hb_compExprNewArgRef( HB_COMP_PARAM ); ;}
break;
case 122:
#line 543 "macro.y"
{
if( !(HB_MACRO_DATA->Flags & HB_MACRO_GEN_LIST) )
{
HB_TRACE(HB_TR_DEBUG, ("macro -> invalid expression: %s", HB_MACRO_DATA->string));
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
YYABORT;
}
;}
break;
case 123:
#line 551 "macro.y"
{
HB_MACRO_DATA->uiListElements = 1;
(yyval.asExpr) = hb_compExprAddListExpr( ( HB_MACRO_DATA->Flags & HB_MACRO_GEN_PARE ) ? hb_compExprNewList( (yyvsp[(1) - (4)].asExpr), HB_COMP_PARAM ) : hb_compExprNewArgList( (yyvsp[(1) - (4)].asExpr), HB_COMP_PARAM ), (yyvsp[(4) - (4)].asExpr) );
;}
break;
case 125:
#line 558 "macro.y"
{ HB_MACRO_DATA->uiListElements++;
(yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 126:
#line 562 "macro.y"
{ (yyval.asExpr) = hb_compExprNewEmpty( HB_COMP_PARAM ); ;}
break;
case 150:
#line 593 "macro.y"
{ (yyval.asExpr) = hb_compExprNewPostInc( (yyvsp[(0) - (1)].asExpr), HB_COMP_PARAM ); ;}
break;
case 151:
#line 594 "macro.y"
{ (yyval.asExpr) = hb_compExprNewPostDec( (yyvsp[(0) - (1)].asExpr), HB_COMP_PARAM ); ;}
break;
case 152:
#line 600 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 153:
#line 603 "macro.y"
{ (yyval.asExpr) = hb_compExprNewPreInc( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 154:
#line 604 "macro.y"
{ (yyval.asExpr) = hb_compExprNewPreDec( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 155:
#line 607 "macro.y"
{ (yyval.asExpr) = hb_compExprNewNot( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 156:
#line 608 "macro.y"
{ (yyval.asExpr) = hb_compExprNewNegate( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 157:
#line 609 "macro.y"
{ (yyval.asExpr) = (yyvsp[(2) - (2)].asExpr); ;}
break;
case 158:
#line 612 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 159:
#line 613 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 160:
#line 614 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 161:
#line 615 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 162:
#line 616 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 163:
#line 617 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 164:
#line 618 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 165:
#line 619 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 166:
#line 620 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 167:
#line 621 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 168:
#line 622 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 169:
#line 623 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 170:
#line 624 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 171:
#line 625 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 172:
#line 626 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 173:
#line 627 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 174:
#line 628 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 175:
#line 629 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 176:
#line 630 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 177:
#line 631 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 178:
#line 632 "macro.y"
{ HB_MACRO_IFENABLED( (yyval.asExpr), hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ), HB_SM_HARBOUR ); ;}
break;
case 179:
#line 633 "macro.y"
{ (yyval.asExpr) = hb_compExprAssign( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 180:
#line 636 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlusEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 181:
#line 639 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinusEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 182:
#line 642 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMultEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 183:
#line 645 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDivEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 184:
#line 648 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewModEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 185:
#line 651 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewExpEq( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 192:
#line 662 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPlus( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 193:
#line 663 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMinus( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 194:
#line 664 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMult( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 195:
#line 665 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewDiv( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 196:
#line 666 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewMod( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 197:
#line 667 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewPower( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 198:
#line 670 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewAnd( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 199:
#line 671 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewOr( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 200:
#line 674 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEQ( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 201:
#line 675 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLT( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 202:
#line 676 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGT( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 203:
#line 677 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewLE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 204:
#line 678 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewGE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 205:
#line 679 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 206:
#line 680 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewNE( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 207:
#line 681 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewIN( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 208:
#line 682 "macro.y"
{ (yyval.asExpr) = hb_compExprSetOperand( hb_compExprNewEqual( (yyvsp[(1) - (3)].asExpr), HB_COMP_PARAM ), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 210:
#line 691 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(0) - (2)].asExpr), (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 211:
#line 692 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr), HB_COMP_PARAM ); ;}
break;
case 212:
#line 693 "macro.y"
{ (yyval.asExpr) = hb_macroExprNewArrayAt( (yyvsp[(1) - (4)].asExpr), (yyvsp[(4) - (4)].asExpr), HB_COMP_PARAM ); ;}
break;
case 213:
#line 696 "macro.y"
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[(1) - (1)].asExpr), HB_COMP_PARAM ); ;}
break;
case 214:
#line 697 "macro.y"
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 215:
#line 701 "macro.y"
{ (yyval.asExpr) = hb_compExprNewCodeBlock( NULL, 0, 0, HB_COMP_PARAM ); ;}
break;
case 216:
#line 703 "macro.y"
{ (yyval.asExpr) = (yyvsp[(3) - (7)].asExpr); ;}
break;
case 217:
#line 708 "macro.y"
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (1)].asExpr), (yyvsp[(1) - (1)].asExpr) ); ;}
break;
case 218:
#line 709 "macro.y"
{ (yyval.asExpr) = hb_compExprAddCodeblockExpr( (yyvsp[(-2) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 219:
#line 714 "macro.y"
{ (yyval.asExpr) = NULL; ;}
break;
case 220:
#line 715 "macro.y"
{ (yyval.asExpr) = NULL; (yyvsp[(0) - (1)].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; ;}
break;
case 221:
#line 716 "macro.y"
{ (yyval.asExpr) = (yyvsp[(1) - (1)].asExpr); ;}
break;
case 222:
#line 717 "macro.y"
{ (yyval.asExpr) = (yyvsp[(1) - (3)].asExpr); (yyvsp[(0) - (3)].asExpr)->value.asCodeblock.flags |= HB_BLOCK_VPARAMS; ;}
break;
case 223:
#line 720 "macro.y"
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (1)].asExpr), (yyvsp[(1) - (1)].string), ' ', HB_COMP_PARAM ); ;}
break;
case 224:
#line 721 "macro.y"
{ (yyval.asExpr) = hb_compExprCBVarAdd( (yyvsp[(0) - (3)].asExpr), (yyvsp[(3) - (3)].string), ' ', HB_COMP_PARAM ); HB_MACRO_CHECK( (yyval.asExpr) ); ;}
break;
case 225:
#line 724 "macro.y"
{ (yyval.asExpr) = hb_compExprNewList( (yyvsp[(2) - (2)].asExpr), HB_COMP_PARAM ); ;}
break;
case 226:
#line 725 "macro.y"
{ (yyval.asExpr) = hb_compExprAddListExpr( (yyvsp[(1) - (3)].asExpr), (yyvsp[(3) - (3)].asExpr) ); ;}
break;
case 229:
#line 736 "macro.y"
{ (yyval.asExpr) = hb_compExprNewIIF( hb_compExprAddListExpr( hb_compExprAddListExpr( hb_compExprNewList( (yyvsp[(3) - (8)].asExpr), HB_COMP_PARAM ), (yyvsp[(5) - (8)].asExpr) ), (yyvsp[(7) - (8)].asExpr) ) ); ;}
break;
/* Line 1268 of yacc.c. */
#line 2977 "macroy.c"
default: break;
}
YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
*++yyvsp = yyval;
/* Now `shift' the result of the reduction. Determine what state
that goes to, based on the state we popped back to and the rule
number reduced by. */
yyn = yyr1[yyn];
yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
yystate = yytable[yystate];
else
yystate = yydefgoto[yyn - YYNTOKENS];
goto yynewstate;
/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
/* If not already recovering from an error, report this error. */
if (!yyerrstatus)
{
++yynerrs;
YYUSE (yynerrs);
#if ! YYERROR_VERBOSE
yyerror (pMacro, YY_("syntax error"));
#else
{
YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
{
YYSIZE_T yyalloc = 2 * yysize;
if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
yyalloc = YYSTACK_ALLOC_MAXIMUM;
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
yymsg = (char *) YYSTACK_ALLOC (yyalloc);
if (yymsg)
yymsg_alloc = yyalloc;
else
{
yymsg = yymsgbuf;
yymsg_alloc = sizeof yymsgbuf;
}
}
if (0 < yysize && yysize <= yymsg_alloc)
{
(void) yysyntax_error (yymsg, yystate, yychar);
yyerror (pMacro, yymsg);
}
else
{
yyerror (pMacro, YY_("syntax error"));
if (yysize != 0)
goto yyexhaustedlab;
}
}
#endif
}
if (yyerrstatus == 3)
{
/* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
/* Return failure if at end of input. */
if (yychar == YYEOF)
YYABORT;
}
else
{
yydestruct ("Error: discarding",
yytoken, &yylval, pMacro);
yychar = YYEMPTY;
}
}
/* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR. |
`---------------------------------------------------*/
#ifndef NO_YYERROR
yyerrorlab:
/* Pacify compilers like GCC when the user code never invokes
YYERROR and the label yyerrorlab therefore never appears in user
code. */
#if ! defined( __BORLANDC__ ) && ! defined( __WATCOMC__ )
if (/*CONSTCOND*/ 0)
goto yyerrorlab;
#endif
/* Do not reclaim the symbols of the rule which action triggered
this YYERROR. */
YYPOPSTACK (yylen);
yylen = 0;
YY_STACK_PRINT (yyss, yyssp);
yystate = *yyssp;
goto yyerrlab1;
#endif /* NO_YYERROR */
/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR. |
`-------------------------------------------------------------*/
yyerrlab1:
yyerrstatus = 3; /* Each real token shifted decrements this. */
for (;;)
{
yyn = yypact[yystate];
if (yyn != YYPACT_NINF)
{
yyn += YYTERROR;
if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
{
yyn = yytable[yyn];
if (0 < yyn)
break;
}
}
/* Pop the current state because it cannot handle the error token. */
if (yyssp == yyss)
YYABORT;
yydestruct ("Error: popping",
yystos[yystate], yyvsp, pMacro);
YYPOPSTACK (1);
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
}
if (yyn == YYFINAL)
YYACCEPT;
*++yyvsp = yylval;
/* Shift the error token. */
YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
yystate = yyn;
goto yynewstate;
/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here. |
`-------------------------------------*/
yyacceptlab:
yyresult = 0;
goto yyreturn;
/*-----------------------------------.
| yyabortlab -- YYABORT comes here. |
`-----------------------------------*/
yyabortlab:
yyresult = 1;
goto yyreturn;
#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here. |
`-------------------------------------------------*/
yyexhaustedlab:
yyerror (pMacro, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
if (yychar != YYEOF && yychar != YYEMPTY)
yydestruct ("Cleanup: discarding lookahead",
yytoken, &yylval, pMacro);
/* Do not reclaim the symbols of the rule which action triggered
this YYABORT or YYACCEPT. */
YYPOPSTACK (yylen);
YY_STACK_PRINT (yyss, yyssp);
while (yyssp != yyss)
{
yydestruct ("Cleanup: popping",
yystos[*yyssp], yyvsp, pMacro);
YYPOPSTACK (1);
}
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
if (yymsg != yymsgbuf)
YYSTACK_FREE (yymsg);
#endif
/* Make sure YYID is used. */
return YYID (yyresult);
}
#line 739 "macro.y"
/*
** ------------------------------------------------------------------------ **
*/
void yyerror( HB_MACRO_PTR pMacro, const char * s )
{
HB_SYMBOL_UNUSED( pMacro );
HB_SYMBOL_UNUSED( s );
}
/* ************************************************************************* */
typedef struct HB_MEXPR_
{
HB_EXPR Expression;
struct HB_MEXPR_ *pPrev;
}
HB_MEXPR, * HB_MEXPR_PTR;
typedef struct HB_MIDENT_
{
char * Identifier;
struct HB_MIDENT_ *pPrev;
}
HB_MIDENT, * HB_MIDENT_PTR;
/* Allocates memory for Expression holder structure and stores it
* on the linked list
*/
static HB_EXPR_PTR hb_macroExprAlloc( HB_COMP_DECL )
{
HB_MEXPR_PTR pMExpr = ( HB_MEXPR_PTR ) hb_xgrab( sizeof( HB_MEXPR ) );
pMExpr->pPrev = ( HB_MEXPR_PTR ) HB_MACRO_DATA->pExprLst;
HB_MACRO_DATA->pExprLst = ( void * ) pMExpr;
return &pMExpr->Expression;
}
static void hb_macroIdentNew( HB_COMP_DECL, char * szIdent )
{
HB_MIDENT_PTR pMIdent = ( HB_MIDENT_PTR ) hb_xgrab( sizeof( HB_MIDENT ) );
pMIdent->Identifier = szIdent;
pMIdent->pPrev = ( HB_MIDENT_PTR ) HB_MACRO_DATA->pIdentLst;
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent;
}
static HB_EXPR_PTR hb_macroExprNew( HB_COMP_DECL, HB_EXPRTYPE iType )
{
HB_EXPR_PTR pExpr;
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprNew(%p,%i)", HB_COMP_PARAM, iType));
pExpr = hb_macroExprAlloc( HB_COMP_PARAM );
pExpr->ExprType = iType;
pExpr->pNext = NULL;
pExpr->ValType = HB_EV_UNKNOWN;
pExpr->Counter = 1;
return pExpr;
}
/* Delete self - all components will be deleted somewhere else
*/
static void hb_macroExprClear( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
HB_SYMBOL_UNUSED( HB_COMP_PARAM );
if( --pExpr->Counter == 0 )
pExpr->ExprType = HB_ET_NONE;
}
/* Delete all components and delete self
*/
static void hb_macroExprDelete( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprDelete(%p,%p)", HB_COMP_PARAM, pExpr));
if( pExpr && --pExpr->Counter == 0 )
{
HB_EXPR_USE( pExpr, HB_EA_DELETE );
pExpr->ExprType = HB_ET_NONE;
}
}
/* Delete all components and delete self
*/
static void hb_macroExprFree( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
HB_TRACE(HB_TR_DEBUG, ("hb_macroExprFree()"));
if( --pExpr->Counter == 0 )
{
HB_EXPR_USE( pExpr, HB_EA_DELETE );
pExpr->ExprType = HB_ET_NONE;
}
}
/* Deallocate all memory used by expression optimizer */
static void hb_macroLstFree( HB_MACRO_PTR pMacro )
{
if( pMacro->pExprLst )
{
HB_MEXPR_PTR pMExpr = ( HB_MEXPR_PTR ) pMacro->pExprLst;
do
{
hb_macroExprDelete( pMacro, &pMExpr->Expression );
pMExpr = pMExpr->pPrev;
}
while( pMExpr );
do
{
pMExpr = ( HB_MEXPR_PTR ) pMacro->pExprLst;
pMacro->pExprLst = ( void * ) pMExpr->pPrev;
hb_xfree( pMExpr );
}
while( pMacro->pExprLst );
}
while( pMacro->pIdentLst )
{
HB_MIDENT_PTR pMIdent = ( HB_MIDENT_PTR ) HB_MACRO_DATA->pIdentLst;
HB_MACRO_DATA->pIdentLst = ( void * ) pMIdent->pPrev;
hb_xfree( pMIdent->Identifier );
hb_xfree( pMIdent );
}
}
static HB_EXPR_PTR hb_macroErrorType( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
hb_macroError( EG_ARG, HB_COMP_PARAM );
return pExpr;
}
static HB_EXPR_PTR hb_macroErrorSyntax( HB_COMP_DECL, HB_EXPR_PTR pExpr )
{
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
return pExpr;
}
static void hb_macroErrorDuplVar( HB_COMP_DECL, const char * szVarName )
{
HB_SYMBOL_UNUSED( szVarName );
hb_macroError( EG_SYNTAX, HB_COMP_PARAM );
}
static const HB_COMP_FUNCS s_macro_funcs =
{
hb_macroExprNew,
hb_macroExprClear,
hb_macroExprFree,
hb_macroExprDelete,
hb_macroErrorType,
hb_macroErrorSyntax,
hb_macroErrorDuplVar,
};
int hb_macroYYParse( HB_MACRO_PTR pMacro )
{
int iResult;
pMacro->funcs = &s_macro_funcs;
if( hb_macroLexNew( pMacro ) )
{
pMacro->status = HB_MACRO_CONT;
pMacro->pExprLst = NULL;
pMacro->pIdentLst = NULL;
iResult = yyparse( pMacro );
hb_macroLstFree( pMacro );
hb_macroLexDelete( pMacro );
}
else
iResult = HB_MACRO_FAILURE;
return iResult;
}
#if defined( HB_MACRO_PPLEX )
/* it's an example of PP token translator which change tokens generated by
PP into terminal symbols used by our grammar parser generated by Bison */
BOOL hb_macroLexNew( HB_MACRO_PTR pMacro )
{
pMacro->pLex = ( void * ) hb_pp_lexNew( pMacro->string, pMacro->length );
return pMacro->pLex != NULL;
}
void hb_macroLexDelete( HB_MACRO_PTR pMacro )
{
if( pMacro->pLex )
{
hb_pp_free( ( PHB_PP_STATE ) pMacro->pLex );
pMacro->pLex = NULL;
}
}
int hb_macrolex( YYSTYPE *yylval_ptr, HB_MACRO_PTR pMacro )
{
PHB_PP_TOKEN pToken = hb_pp_lexGet( ( PHB_PP_STATE ) pMacro->pLex );
if( !pToken )
return 0;
switch( HB_PP_TOKEN_TYPE( pToken->type ) )
{
case HB_PP_TOKEN_KEYWORD:
if( pToken->len >= 4 && pToken->len <= 6 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_ALIAS &&
( hb_strnicmp( "_FIELD", pToken->value, pToken->len ) == 0 ||
hb_strnicmp( "FIELD", pToken->value, pToken->len ) == 0 ) )
{
return FIELD;
}
else if( pToken->len == 3 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB &&
hb_stricmp( "IIF", pToken->value ) == 0 )
{
return IIF;
}
else if( pToken->len == 2 && pToken->pNext &&
HB_PP_TOKEN_TYPE( pToken->pNext->type ) == HB_PP_TOKEN_LEFT_PB &&
hb_stricmp( "IF", pToken->value ) == 0 )
return IIF;
else if( pToken->len == 3 && hb_stricmp( "NIL", pToken->value ) == 0 )
return NIL;
hb_pp_tokenUpper( pToken );
yylval_ptr->string = pToken->value;
return IDENTIFIER;
case HB_PP_TOKEN_MACROVAR:
hb_pp_tokenUpper( pToken );
yylval_ptr->string = pToken->value;
return MACROVAR;
case HB_PP_TOKEN_MACROTEXT:
hb_pp_tokenUpper( pToken );
yylval_ptr->string = pToken->value;
return MACROTEXT;
case HB_PP_TOKEN_NUMBER:
{
HB_LONG lNumber;
double dNumber;
int iDec, iWidth;
if( hb_compStrToNum( pToken->value, pToken->len, &lNumber, &dNumber, &iDec, &iWidth ) )
{
yylval_ptr->valDouble.dNumber = dNumber;
yylval_ptr->valDouble.bDec = ( UCHAR ) iDec;
yylval_ptr->valDouble.bWidth = ( UCHAR ) iWidth;
return NUM_DOUBLE;
}
else
{
yylval_ptr->valLong.lNumber = lNumber;
yylval_ptr->valLong.bWidth = ( UCHAR ) iWidth;
return NUM_LONG;
}
}
case HB_PP_TOKEN_DATE:
if( pToken->len == 10 )
{
int year, month, day;
hb_dateStrGet( pToken->value + 2, &year, &month, &day );
yylval_ptr->valLong.lNumber = hb_dateEncode( year, month, day );
}
else
yylval_ptr->valLong.lNumber = 0;
return NUM_DATE;
case HB_PP_TOKEN_TIMESTAMP:
if( !hb_timeStampStrGetDT( pToken->value,
&yylval_ptr->valTimeStamp.date,
&yylval_ptr->valTimeStamp.time ) )
{
hb_macroError( EG_SYNTAX, pMacro );
}
return TIMESTAMP;
case HB_PP_TOKEN_STRING:
yylval_ptr->valChar.string = pToken->value;
yylval_ptr->valChar.length = pToken->len;
return LITERAL;
case HB_PP_TOKEN_LOGICAL:
return pToken->value[ 1 ] == 'T' ? TRUEVALUE : FALSEVALUE;
case HB_PP_TOKEN_HASH:
case HB_PP_TOKEN_DIRECTIVE:
return NE1;
case HB_PP_TOKEN_NE:
return NE2;
case HB_PP_TOKEN_ASSIGN:
return INASSIGN;
case HB_PP_TOKEN_EQUAL:
return EQ;
case HB_PP_TOKEN_INC:
return INC;
case HB_PP_TOKEN_DEC:
return DEC;
case HB_PP_TOKEN_ALIAS:
return ALIASOP;
case HB_PP_TOKEN_LE:
return LE;
case HB_PP_TOKEN_GE:
return GE;
case HB_PP_TOKEN_PLUSEQ:
return PLUSEQ;
case HB_PP_TOKEN_MINUSEQ:
return MINUSEQ;
case HB_PP_TOKEN_MULTEQ:
return MULTEQ;
case HB_PP_TOKEN_DIVEQ:
return DIVEQ;
case HB_PP_TOKEN_MODEQ:
return MODEQ;
case HB_PP_TOKEN_EXPEQ:
return EXPEQ;
case HB_PP_TOKEN_POWER:
return POWER;
case HB_PP_TOKEN_AND:
return AND;
case HB_PP_TOKEN_OR:
return OR;
case HB_PP_TOKEN_NOT:
return NOT;
default:
return pToken->value[ 0 ];
}
}
#endif /* HB_MACRO_PPLEX */