mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Moved flex/bison generated files to subfolder "generated"
Added FLEX/BISON cmake generation
This commit is contained in:
parent
04c7565281
commit
147851c506
10 changed files with 3082 additions and 3160 deletions
|
@ -19,6 +19,25 @@ set(SOURCES_SHARED
|
|||
file(GLOB_RECURSE SOURCES_GAME "./*.c*" "../parser/*.c*" "../script/*.c*")
|
||||
|
||||
add_library(fgame SHARED ${SOURCES_GAME})
|
||||
|
||||
find_package(BISON)
|
||||
find_package(FLEX)
|
||||
|
||||
if (FLEX_FOUND)
|
||||
flex_target(fgame-lexer ${CMAKE_SOURCE_DIR}/code/parser/lex_source.txt ${CMAKE_SOURCE_DIR}/code/parser/generated/yyLexer.cpp DEFINES_FILE ${CMAKE_SOURCE_DIR}/code/parser/generated/yyLexer.h COMPILE_FLAGS "-Cem --nounistd")
|
||||
endif()
|
||||
|
||||
if (BISON_FOUND)
|
||||
bison_target(fgame-parser ${CMAKE_SOURCE_DIR}/code/parser/bison_source.txt ${CMAKE_SOURCE_DIR}/code/parser/generated/yyParser.cpp)
|
||||
endif()
|
||||
|
||||
if (FLEX_FOUND AND BISON_FOUND)
|
||||
add_flex_bison_dependency(fgame-lexer fgame-parser)
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY "${CMAKE_SOURCE_DIR}/code/parser/generated")
|
||||
target_sources(fgame PRIVATE ${BISON_fgame-parser_OUTPUTS} ${FLEX_fgame-lexer_OUTPUTS})
|
||||
|
||||
target_compile_definitions(fgame PRIVATE GAME_DLL WITH_SCRIPT_ENGINE ARCHIVE_SUPPORTED)
|
||||
target_compile_features(fgame PUBLIC cxx_nullptr)
|
||||
target_compile_features(fgame PUBLIC c_variadic_macros)
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
*/
|
||||
|
||||
#include "scriptcompiler.h"
|
||||
#include "yyParser.h"
|
||||
#include "yyLexer.h"
|
||||
#include "./yyParser.hpp"
|
||||
#include "./yyLexer.h"
|
||||
|
||||
int yyerror( const char *msg );
|
||||
|
||||
|
@ -38,9 +38,6 @@ extern yyparsedata parsedata;
|
|||
|
||||
%}
|
||||
|
||||
%output "../../../code/globalcpp/parser/yyParser.cpp"
|
||||
%defines "../../../code/globalcpp/parser/yyParser.h"
|
||||
|
||||
%error-verbose
|
||||
|
||||
%expect 306
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#line 1 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 1 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
|
||||
#line 3 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 3 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
|
@ -9,89 +9,11 @@
|
|||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 6
|
||||
#define YY_FLEX_SUBMINOR_VERSION 3
|
||||
#define YY_FLEX_SUBMINOR_VERSION 4
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
||||
#define yy_create_buffer yy_create_buffer
|
||||
|
||||
#define yy_delete_buffer yy_delete_buffer
|
||||
|
||||
#define yy_scan_buffer yy_scan_buffer
|
||||
|
||||
#define yy_scan_string yy_scan_string
|
||||
|
||||
#define yy_scan_bytes yy_scan_bytes
|
||||
|
||||
#define yy_init_buffer yy_init_buffer
|
||||
|
||||
#define yy_flush_buffer yy_flush_buffer
|
||||
|
||||
#define yy_load_buffer_state yy_load_buffer_state
|
||||
|
||||
#define yy_switch_to_buffer yy_switch_to_buffer
|
||||
|
||||
#define yypush_buffer_state yypush_buffer_state
|
||||
|
||||
#define yypop_buffer_state yypop_buffer_state
|
||||
|
||||
#define yyensure_buffer_stack yyensure_buffer_stack
|
||||
|
||||
#define yylex yylex
|
||||
|
||||
#define yyrestart yyrestart
|
||||
|
||||
#define yylex_init yylex_init
|
||||
|
||||
#define yylex_init_extra yylex_init_extra
|
||||
|
||||
#define yylex_destroy yylex_destroy
|
||||
|
||||
#define yyget_debug yyget_debug
|
||||
|
||||
#define yyset_debug yyset_debug
|
||||
|
||||
#define yyget_extra yyget_extra
|
||||
|
||||
#define yyset_extra yyset_extra
|
||||
|
||||
#define yyget_in yyget_in
|
||||
|
||||
#define yyset_in yyset_in
|
||||
|
||||
#define yyget_out yyget_out
|
||||
|
||||
#define yyset_out yyset_out
|
||||
|
||||
#define yyget_leng yyget_leng
|
||||
|
||||
#define yyget_text yyget_text
|
||||
|
||||
#define yyget_lineno yyget_lineno
|
||||
|
||||
#define yyset_lineno yyset_lineno
|
||||
|
||||
#define yywrap yywrap
|
||||
|
||||
#define yyalloc yyalloc
|
||||
|
||||
#define yyrealloc yyrealloc
|
||||
|
||||
#define yyfree yyfree
|
||||
|
||||
#define yytext yytext
|
||||
|
||||
#define yyleng yyleng
|
||||
|
||||
#define yyin yyin
|
||||
|
||||
#define yyout yyout
|
||||
|
||||
#define yy_flex_debug yy_flex_debug
|
||||
|
||||
#define yylineno yylineno
|
||||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
/* begin standard C headers. */
|
||||
|
@ -162,10 +84,16 @@ typedef unsigned int flex_uint32_t;
|
|||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
/* begin standard C++ headers. */
|
||||
|
||||
/* TODO: this is always defined, so inline it */
|
||||
#define yyconst const
|
||||
|
||||
|
@ -197,7 +125,7 @@ typedef unsigned int flex_uint32_t;
|
|||
/* Action number for EOF rule of a given start state. */
|
||||
#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
|
||||
/* Special action meaning "start processing a new file". */
|
||||
#define YY_NEW_FILE yyrestart(yyin )
|
||||
#define YY_NEW_FILE yyrestart( yyin )
|
||||
#define YY_END_OF_BUFFER_CHAR 0
|
||||
|
||||
/* Size of default input buffer. */
|
||||
|
@ -382,7 +310,7 @@ void yypop_buffer_state ( void );
|
|||
static void yyensure_buffer_stack ( void );
|
||||
static void yy_load_buffer_state ( void );
|
||||
static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
|
||||
#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER )
|
||||
#define YY_FLUSH_BUFFER yy_flush_buffer( YY_CURRENT_BUFFER )
|
||||
|
||||
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
|
||||
YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
|
||||
|
@ -398,7 +326,7 @@ void yyfree ( void * );
|
|||
if ( ! YY_CURRENT_BUFFER ){ \
|
||||
yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \
|
||||
}
|
||||
|
@ -407,7 +335,7 @@ void yyfree ( void * );
|
|||
if ( ! YY_CURRENT_BUFFER ){\
|
||||
yyensure_buffer_stack (); \
|
||||
YY_CURRENT_BUFFER_LVALUE = \
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE ); \
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE ); \
|
||||
} \
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \
|
||||
}
|
||||
|
@ -848,8 +776,8 @@ goto find_rule; \
|
|||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *yytext;
|
||||
#line 1 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 2 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 1 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
#line 2 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
/*
|
||||
* ===========================================================================
|
||||
* Copyright (C) 2015 the OpenMoHAA team
|
||||
|
@ -876,7 +804,7 @@ char *yytext;
|
|||
*/
|
||||
|
||||
#include "scriptcompiler.h"
|
||||
#include "yyParser.h"
|
||||
#include "./yyParser.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -977,10 +905,10 @@ static bool UseField( void )
|
|||
*yytext == '$' || *yytext == '-' || *yytext == '/' );
|
||||
}
|
||||
|
||||
#line 980 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 908 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
/*%option debug*/
|
||||
|
||||
#line 983 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 911 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
|
||||
#define INITIAL 0
|
||||
#define C_COMMENT 1
|
||||
|
@ -988,14 +916,6 @@ static bool UseField( void )
|
|||
#define VARIABLES 3
|
||||
#define IDENTIFIER 4
|
||||
|
||||
#ifndef YY_NO_UNISTD_H
|
||||
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
||||
* down here because we want the user's section 1 to have been scanned first.
|
||||
* The user has a chance to override it with an option.
|
||||
*/
|
||||
//#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef YY_EXTRA_TYPE
|
||||
#define YY_EXTRA_TYPE void *
|
||||
#endif
|
||||
|
@ -1200,17 +1120,17 @@ YY_DECL
|
|||
if ( ! YY_CURRENT_BUFFER ) {
|
||||
yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
{
|
||||
#line 144 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 143 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
|
||||
|
||||
#line 1213 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 1133 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
|
||||
while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */
|
||||
{
|
||||
|
@ -1248,7 +1168,9 @@ yy_match:
|
|||
yy_find_action:
|
||||
yy_current_state = *--(yy_state_ptr);
|
||||
(yy_lp) = yy_accept[yy_current_state];
|
||||
|
||||
find_rule: /* we branch to this label when backing up */
|
||||
|
||||
for ( ; ; ) /* until we find what rule we matched */
|
||||
{
|
||||
if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )
|
||||
|
@ -1282,71 +1204,71 @@ do_action: /* This label is used only to access EOF actions. */
|
|||
{ /* beginning of action switch */
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 146 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 145 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( C_COMMENT ); }
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 147 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 146 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( INITIAL ); }
|
||||
YY_BREAK
|
||||
case 3:
|
||||
/* rule 3 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 148 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 147 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ ; }
|
||||
YY_BREAK
|
||||
case 4:
|
||||
YY_RULE_SETUP
|
||||
#line 149 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 148 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ ; }
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 150 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 149 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ Compiler.CompileError( parsedata.pos - yyleng, "'*/' found outside of comment" ); }
|
||||
YY_BREAK
|
||||
case 6:
|
||||
/* rule 6 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 153 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 152 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ ; }
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 154 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 153 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
|
||||
YY_BREAK
|
||||
case 8:
|
||||
/* rule 8 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 156 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 155 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( INITIAL ); YYLEX( TOKEN_EOL ); }
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 157 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 156 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SIZE ); }
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 158 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 157 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_PERIOD ); }
|
||||
YY_BREAK
|
||||
case 11:
|
||||
/* rule 11 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 159 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 158 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; TextEscapeValue( yytext + 1, strlen( yytext ) - 2 ); YYLEX( TOKEN_STRING ); }
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 160 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 159 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; TextValue( yytext, strlen( yytext ) ); YYLEX( TOKEN_IDENTIFIER ); }
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 161 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 160 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{
|
||||
for ( int i = yyleng - 1; i >= 0; --i )
|
||||
unput( yytext[ i ] );
|
||||
|
@ -1359,388 +1281,388 @@ YY_RULE_SETUP
|
|||
case 14:
|
||||
/* rule 14 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 170 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 169 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ if( prev_yylex != TOKEN_EOL ) YYLEX( TOKEN_EOL ); }
|
||||
YY_BREAK
|
||||
case 15:
|
||||
YY_RULE_SETUP
|
||||
#line 171 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 170 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ ; }
|
||||
YY_BREAK
|
||||
case 16:
|
||||
/* rule 16 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 173 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 172 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; TextEscapeValue( yytext + 1, strlen( yytext ) - 2 ); YYLEX( TOKEN_STRING ); }
|
||||
YY_BREAK
|
||||
case 17:
|
||||
YY_RULE_SETUP
|
||||
#line 176 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 175 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_TERNARY ); }
|
||||
YY_BREAK
|
||||
case 18:
|
||||
YY_RULE_SETUP
|
||||
#line 177 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 176 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_IF ); }
|
||||
YY_BREAK
|
||||
case 19:
|
||||
YY_RULE_SETUP
|
||||
#line 178 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 177 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_ELSE ); }
|
||||
YY_BREAK
|
||||
case 20:
|
||||
YY_RULE_SETUP
|
||||
#line 179 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 178 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_WHILE ); }
|
||||
YY_BREAK
|
||||
case 21:
|
||||
YY_RULE_SETUP
|
||||
#line 180 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 179 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_FOR ); }
|
||||
YY_BREAK
|
||||
case 22:
|
||||
YY_RULE_SETUP
|
||||
#line 181 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 180 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_DO ); }
|
||||
YY_BREAK
|
||||
case 23:
|
||||
YY_RULE_SETUP
|
||||
#line 183 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 182 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_game ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 24:
|
||||
YY_RULE_SETUP
|
||||
#line 184 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 183 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_group ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 25:
|
||||
YY_RULE_SETUP
|
||||
#line 185 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 184 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_level ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 26:
|
||||
YY_RULE_SETUP
|
||||
#line 186 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 185 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_local ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 27:
|
||||
YY_RULE_SETUP
|
||||
#line 187 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 186 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_parm ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 28:
|
||||
YY_RULE_SETUP
|
||||
#line 188 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 187 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_owner ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 29:
|
||||
YY_RULE_SETUP
|
||||
#line 189 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 188 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); yylval.s.val = node1_( method_self ); YYLEX( TOKEN_LISTENER ); }
|
||||
YY_BREAK
|
||||
case 30:
|
||||
YY_RULE_SETUP
|
||||
#line 191 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 190 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ parsedata.braces_count++; YYLEX( TOKEN_LBRACKET ); }
|
||||
YY_BREAK
|
||||
case 31:
|
||||
YY_RULE_SETUP
|
||||
#line 192 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 191 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ parsedata.braces_count--; YYLEX( TOKEN_RBRACKET ); }
|
||||
YY_BREAK
|
||||
case 32:
|
||||
YY_RULE_SETUP
|
||||
#line 193 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 192 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; YYLEX( TOKEN_LPAREN ); }
|
||||
YY_BREAK
|
||||
case 33:
|
||||
YY_RULE_SETUP
|
||||
#line 194 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 193 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); YYLLOCSET; YYLEX( TOKEN_RPAREN ); }
|
||||
YY_BREAK
|
||||
case 34:
|
||||
YY_RULE_SETUP
|
||||
#line 195 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 194 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_LSQUARE ); }
|
||||
YY_BREAK
|
||||
case 35:
|
||||
YY_RULE_SETUP
|
||||
#line 196 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 195 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); YYLEX( TOKEN_RSQUARE ); }
|
||||
YY_BREAK
|
||||
case 36:
|
||||
YY_RULE_SETUP
|
||||
#line 198 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 197 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_ASSIGNMENT ); }
|
||||
YY_BREAK
|
||||
case 37:
|
||||
YY_RULE_SETUP
|
||||
#line 199 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 198 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_COLON ); }
|
||||
YY_BREAK
|
||||
case 38:
|
||||
YY_RULE_SETUP
|
||||
#line 200 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 199 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_DOUBLE_COLON ); }
|
||||
YY_BREAK
|
||||
case 39:
|
||||
YY_RULE_SETUP
|
||||
#line 201 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 200 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SEMICOLON ); }
|
||||
YY_BREAK
|
||||
case 40:
|
||||
YY_RULE_SETUP
|
||||
#line 203 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 202 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_EQUALITY ); }
|
||||
YY_BREAK
|
||||
case 41:
|
||||
YY_RULE_SETUP
|
||||
#line 204 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 203 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_LOGICAL_OR ); }
|
||||
YY_BREAK
|
||||
case 42:
|
||||
YY_RULE_SETUP
|
||||
#line 205 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 204 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_LOGICAL_AND ); }
|
||||
YY_BREAK
|
||||
case 43:
|
||||
YY_RULE_SETUP
|
||||
#line 207 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 206 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_BITWISE_OR ); }
|
||||
YY_BREAK
|
||||
case 44:
|
||||
YY_RULE_SETUP
|
||||
#line 208 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 207 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_BITWISE_EXCL_OR ); }
|
||||
YY_BREAK
|
||||
case 45:
|
||||
YY_RULE_SETUP
|
||||
#line 209 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 208 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_BITWISE_AND ); }
|
||||
YY_BREAK
|
||||
case 46:
|
||||
YY_RULE_SETUP
|
||||
#line 210 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 209 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_INEQUALITY ); }
|
||||
YY_BREAK
|
||||
case 47:
|
||||
YY_RULE_SETUP
|
||||
#line 211 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 210 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_LESS_THAN ); }
|
||||
YY_BREAK
|
||||
case 48:
|
||||
YY_RULE_SETUP
|
||||
#line 212 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 211 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_GREATER_THAN ); }
|
||||
YY_BREAK
|
||||
case 49:
|
||||
YY_RULE_SETUP
|
||||
#line 213 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 212 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_LESS_THAN_OR_EQUAL ); }
|
||||
YY_BREAK
|
||||
case 50:
|
||||
YY_RULE_SETUP
|
||||
#line 214 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 213 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_GREATER_THAN_OR_EQUAL ); }
|
||||
YY_BREAK
|
||||
case 51:
|
||||
YY_RULE_SETUP
|
||||
#line 215 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 214 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_NEG ); }
|
||||
YY_BREAK
|
||||
case 52:
|
||||
YY_RULE_SETUP
|
||||
#line 217 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 216 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_PLUS ); }
|
||||
YY_BREAK
|
||||
case 53:
|
||||
YY_RULE_SETUP
|
||||
#line 218 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 217 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_PLUS_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 54:
|
||||
YY_RULE_SETUP
|
||||
#line 219 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 218 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_INCREMENT ); }
|
||||
YY_BREAK
|
||||
case 55:
|
||||
YY_RULE_SETUP
|
||||
#line 220 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 219 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MINUS ); }
|
||||
YY_BREAK
|
||||
case 56:
|
||||
YY_RULE_SETUP
|
||||
#line 221 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 220 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MINUS_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 57:
|
||||
YY_RULE_SETUP
|
||||
#line 222 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 221 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MINUS_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 58:
|
||||
YY_RULE_SETUP
|
||||
#line 223 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 222 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_DECREMENT ); }
|
||||
YY_BREAK
|
||||
case 59:
|
||||
YY_RULE_SETUP
|
||||
#line 224 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 223 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MULTIPLY ); }
|
||||
YY_BREAK
|
||||
case 60:
|
||||
YY_RULE_SETUP
|
||||
#line 225 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 224 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MULTIPLY_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 61:
|
||||
YY_RULE_SETUP
|
||||
#line 226 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 225 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_DIVIDE ); }
|
||||
YY_BREAK
|
||||
case 62:
|
||||
YY_RULE_SETUP
|
||||
#line 227 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 226 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_DIVIDE_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 63:
|
||||
YY_RULE_SETUP
|
||||
#line 228 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 227 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MODULUS ); }
|
||||
YY_BREAK
|
||||
case 64:
|
||||
YY_RULE_SETUP
|
||||
#line 229 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 228 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MODULUS_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 65:
|
||||
YY_RULE_SETUP
|
||||
#line 230 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 229 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SHIFT_LEFT ); }
|
||||
YY_BREAK
|
||||
case 66:
|
||||
YY_RULE_SETUP
|
||||
#line 231 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 230 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SHIFT_LEFT_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 67:
|
||||
YY_RULE_SETUP
|
||||
#line 232 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 231 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SHIFT_RIGHT ); }
|
||||
YY_BREAK
|
||||
case 68:
|
||||
YY_RULE_SETUP
|
||||
#line 233 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 232 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SHIFT_RIGHT_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 69:
|
||||
YY_RULE_SETUP
|
||||
#line 234 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 233 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_AND_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 70:
|
||||
YY_RULE_SETUP
|
||||
#line 235 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 234 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_EXCL_OR_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 71:
|
||||
YY_RULE_SETUP
|
||||
#line 236 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 235 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_OR_EQUALS ); }
|
||||
YY_BREAK
|
||||
case 72:
|
||||
YY_RULE_SETUP
|
||||
#line 237 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 236 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ BEGIN( VARIABLES ); YYLEX( TOKEN_DOLLAR ); }
|
||||
YY_BREAK
|
||||
case 73:
|
||||
YY_RULE_SETUP
|
||||
#line 238 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 237 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_NOT ); }
|
||||
YY_BREAK
|
||||
case 74:
|
||||
YY_RULE_SETUP
|
||||
#line 239 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 238 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_COMPLEMENT ); }
|
||||
YY_BREAK
|
||||
case 75:
|
||||
YY_RULE_SETUP
|
||||
#line 241 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 240 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_PERIOD ); }
|
||||
YY_BREAK
|
||||
case 76:
|
||||
YY_RULE_SETUP
|
||||
#line 243 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 242 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_COMMA ); }
|
||||
YY_BREAK
|
||||
case 77:
|
||||
YY_RULE_SETUP
|
||||
#line 244 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 243 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_NUMBER ); }
|
||||
YY_BREAK
|
||||
case 78:
|
||||
YY_RULE_SETUP
|
||||
#line 246 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 245 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_NULL ); }
|
||||
YY_BREAK
|
||||
case 79:
|
||||
YY_RULE_SETUP
|
||||
#line 247 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 246 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_NIL ); }
|
||||
YY_BREAK
|
||||
case 80:
|
||||
YY_RULE_SETUP
|
||||
#line 249 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 248 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; sscanf( yytext, "%d", &yylval.s.val.intValue ); YYLEX( TOKEN_INTEGER ); }
|
||||
YY_BREAK
|
||||
case 81:
|
||||
YY_RULE_SETUP
|
||||
#line 250 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 249 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLLOCSET; sscanf( yytext, "%f", &yylval.s.val.floatValue ); YYLEX( TOKEN_FLOAT ); }
|
||||
YY_BREAK
|
||||
case 82:
|
||||
YY_RULE_SETUP
|
||||
#line 252 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 251 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_TRY ); }
|
||||
YY_BREAK
|
||||
case 83:
|
||||
YY_RULE_SETUP
|
||||
#line 253 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 252 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_CATCH ); }
|
||||
YY_BREAK
|
||||
case 84:
|
||||
YY_RULE_SETUP
|
||||
#line 254 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 253 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_SWITCH ); }
|
||||
YY_BREAK
|
||||
case 85:
|
||||
YY_RULE_SETUP
|
||||
#line 256 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 255 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_CASE ); }
|
||||
YY_BREAK
|
||||
case 86:
|
||||
YY_RULE_SETUP
|
||||
#line 257 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 256 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_BREAK ); }
|
||||
YY_BREAK
|
||||
case 87:
|
||||
YY_RULE_SETUP
|
||||
#line 258 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 257 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_CONTINUE ); }
|
||||
YY_BREAK
|
||||
case 88:
|
||||
YY_RULE_SETUP
|
||||
#line 260 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 259 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_MAKEARRAY ); }
|
||||
YY_BREAK
|
||||
case 89:
|
||||
YY_RULE_SETUP
|
||||
#line 261 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 260 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ YYLEX( TOKEN_ENDARRAY ); }
|
||||
YY_BREAK
|
||||
case 90:
|
||||
YY_RULE_SETUP
|
||||
#line 263 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 262 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{
|
||||
if( UseField() )
|
||||
{
|
||||
|
@ -1757,7 +1679,7 @@ YY_RULE_SETUP
|
|||
YY_BREAK
|
||||
case 91:
|
||||
YY_RULE_SETUP
|
||||
#line 277 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 276 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
{ yylexerror( "bad token:\n" ); }
|
||||
YY_BREAK
|
||||
|
||||
|
@ -1767,10 +1689,10 @@ YY_RULE_SETUP
|
|||
|
||||
case 92:
|
||||
YY_RULE_SETUP
|
||||
#line 285 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 284 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
YY_FATAL_ERROR( "flex scanner jammed" );
|
||||
YY_BREAK
|
||||
#line 1773 "../../../code/globalcpp/parser/yyLexer.cpp"
|
||||
#line 1695 "Z:/openmohaa/code/parser/generated/yyLexer.cpp"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
case YY_STATE_EOF(C_COMMENT):
|
||||
case YY_STATE_EOF(C_LINE_COMMENT):
|
||||
|
@ -1852,7 +1774,7 @@ YY_FATAL_ERROR( "flex scanner jammed" );
|
|||
{
|
||||
(yy_did_buffer_switch_on_eof) = 0;
|
||||
|
||||
if ( yywrap( ) )
|
||||
if ( yywrap( ) )
|
||||
{
|
||||
/* Note: because we've taken care in
|
||||
* yy_get_next_buffer() to have set up
|
||||
|
@ -1987,7 +1909,7 @@ static int yy_get_next_buffer (void)
|
|||
if ( number_to_move == YY_MORE_ADJ )
|
||||
{
|
||||
ret_val = EOB_ACT_END_OF_FILE;
|
||||
yyrestart(yyin );
|
||||
yyrestart( yyin );
|
||||
}
|
||||
|
||||
else
|
||||
|
@ -2004,9 +1926,12 @@ static int yy_get_next_buffer (void)
|
|||
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,(yy_size_t) new_size );
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
|
||||
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||
/* "- 2" to take care of EOB's */
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_buf_size = (int) (new_size - 2);
|
||||
}
|
||||
|
||||
(yy_n_chars) += number_to_move;
|
||||
|
@ -2156,13 +2081,13 @@ static int yy_get_next_buffer (void)
|
|||
*/
|
||||
|
||||
/* Reset buffer status. */
|
||||
yyrestart(yyin );
|
||||
yyrestart( yyin );
|
||||
|
||||
/*FALLTHROUGH*/
|
||||
|
||||
case EOB_ACT_END_OF_FILE:
|
||||
{
|
||||
if ( yywrap( ) )
|
||||
if ( yywrap( ) )
|
||||
return 0;
|
||||
|
||||
if ( ! (yy_did_buffer_switch_on_eof) )
|
||||
|
@ -2205,11 +2130,11 @@ static int yy_get_next_buffer (void)
|
|||
if ( ! YY_CURRENT_BUFFER ){
|
||||
yyensure_buffer_stack ();
|
||||
YY_CURRENT_BUFFER_LVALUE =
|
||||
yy_create_buffer(yyin,YY_BUF_SIZE );
|
||||
yy_create_buffer( yyin, YY_BUF_SIZE );
|
||||
}
|
||||
|
||||
yy_init_buffer(YY_CURRENT_BUFFER,input_file );
|
||||
yy_load_buffer_state( );
|
||||
yy_init_buffer( YY_CURRENT_BUFFER, input_file );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
/** Switch to a different input buffer.
|
||||
|
@ -2237,7 +2162,7 @@ static int yy_get_next_buffer (void)
|
|||
}
|
||||
|
||||
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
|
||||
/* We don't actually know whether we did this switch during
|
||||
* EOF (yywrap()) processing, but the only time this flag
|
||||
|
@ -2265,7 +2190,7 @@ static void yy_load_buffer_state (void)
|
|||
{
|
||||
YY_BUFFER_STATE b;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
|
@ -2274,13 +2199,13 @@ static void yy_load_buffer_state (void)
|
|||
/* yy_ch_buf has to be 2 characters longer than the size given because
|
||||
* we need to put in 2 end-of-buffer characters.
|
||||
*/
|
||||
b->yy_ch_buf = (char *) yyalloc((yy_size_t) (b->yy_buf_size + 2) );
|
||||
b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
|
||||
if ( ! b->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
|
||||
|
||||
b->yy_is_our_buffer = 1;
|
||||
|
||||
yy_init_buffer(b,file );
|
||||
yy_init_buffer( b, file );
|
||||
|
||||
return b;
|
||||
}
|
||||
|
@ -2299,9 +2224,9 @@ static void yy_load_buffer_state (void)
|
|||
YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0;
|
||||
|
||||
if ( b->yy_is_our_buffer )
|
||||
yyfree((void *) b->yy_ch_buf );
|
||||
yyfree( (void *) b->yy_ch_buf );
|
||||
|
||||
yyfree((void *) b );
|
||||
yyfree( (void *) b );
|
||||
}
|
||||
|
||||
/* Initializes or reinitializes a buffer.
|
||||
|
@ -2313,7 +2238,7 @@ static void yy_load_buffer_state (void)
|
|||
{
|
||||
int oerrno = errno;
|
||||
|
||||
yy_flush_buffer(b );
|
||||
yy_flush_buffer( b );
|
||||
|
||||
b->yy_input_file = file;
|
||||
b->yy_fill_buffer = 1;
|
||||
|
@ -2356,7 +2281,7 @@ static void yy_load_buffer_state (void)
|
|||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
if ( b == YY_CURRENT_BUFFER )
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
}
|
||||
|
||||
/** Pushes the new state onto the stack. The new state becomes
|
||||
|
@ -2387,7 +2312,7 @@ void yypush_buffer_state (YY_BUFFER_STATE new_buffer )
|
|||
YY_CURRENT_BUFFER_LVALUE = new_buffer;
|
||||
|
||||
/* copied from yy_switch_to_buffer. */
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
(yy_did_buffer_switch_on_eof) = 1;
|
||||
}
|
||||
|
||||
|
@ -2406,7 +2331,7 @@ void yypop_buffer_state (void)
|
|||
--(yy_buffer_stack_top);
|
||||
|
||||
if (YY_CURRENT_BUFFER) {
|
||||
yy_load_buffer_state( );
|
||||
yy_load_buffer_state( );
|
||||
(yy_did_buffer_switch_on_eof) = 1;
|
||||
}
|
||||
}
|
||||
|
@ -2473,7 +2398,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|||
/* They forgot to leave room for the EOB's. */
|
||||
return NULL;
|
||||
|
||||
b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) );
|
||||
b = (YY_BUFFER_STATE) yyalloc( sizeof( struct yy_buffer_state ) );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
|
||||
|
||||
|
@ -2487,7 +2412,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|||
b->yy_fill_buffer = 0;
|
||||
b->yy_buffer_status = YY_BUFFER_NEW;
|
||||
|
||||
yy_switch_to_buffer(b );
|
||||
yy_switch_to_buffer( b );
|
||||
|
||||
return b;
|
||||
}
|
||||
|
@ -2503,7 +2428,7 @@ YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size )
|
|||
YY_BUFFER_STATE yy_scan_string (const char * yystr )
|
||||
{
|
||||
|
||||
return yy_scan_bytes(yystr,(int) strlen(yystr) );
|
||||
return yy_scan_bytes( yystr, (int) strlen(yystr) );
|
||||
}
|
||||
|
||||
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
|
||||
|
@ -2522,7 +2447,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
|||
|
||||
/* Get memory for full buffer, including space for trailing EOB's. */
|
||||
n = (yy_size_t) (_yybytes_len + 2);
|
||||
buf = (char *) yyalloc(n );
|
||||
buf = (char *) yyalloc( n );
|
||||
if ( ! buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
|
||||
|
||||
|
@ -2531,7 +2456,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
|||
|
||||
buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
|
||||
|
||||
b = yy_scan_buffer(buf,n );
|
||||
b = yy_scan_buffer( buf, n );
|
||||
if ( ! b )
|
||||
YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
|
||||
|
||||
|
@ -2549,7 +2474,7 @@ YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
|
|||
|
||||
static void yynoreturn yy_fatal_error (const char* msg )
|
||||
{
|
||||
(void) fprintf( stderr, "%s\n", msg );
|
||||
fprintf( stderr, "%s\n", msg );
|
||||
exit( YY_EXIT_FAILURE );
|
||||
}
|
||||
|
||||
|
@ -2692,7 +2617,7 @@ int yylex_destroy (void)
|
|||
|
||||
/* Pop the buffer stack, destroying each element. */
|
||||
while(YY_CURRENT_BUFFER){
|
||||
yy_delete_buffer(YY_CURRENT_BUFFER );
|
||||
yy_delete_buffer( YY_CURRENT_BUFFER );
|
||||
YY_CURRENT_BUFFER_LVALUE = NULL;
|
||||
yypop_buffer_state();
|
||||
}
|
||||
|
@ -2761,6 +2686,6 @@ void yyfree (void * ptr )
|
|||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 285 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#line 284 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
#define yyHEADER_H 1
|
||||
#define yyIN_HEADER 1
|
||||
|
||||
#line 5 "../../../code/globalcpp/parser/yyLexer.h"
|
||||
#line 5 "Z:/openmohaa/code/parser/generated/yyLexer.h"
|
||||
|
||||
#line 7 "../../../code/globalcpp/parser/yyLexer.h"
|
||||
#line 7 "Z:/openmohaa/code/parser/generated/yyLexer.h"
|
||||
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
|
@ -13,89 +13,11 @@
|
|||
#define FLEX_SCANNER
|
||||
#define YY_FLEX_MAJOR_VERSION 2
|
||||
#define YY_FLEX_MINOR_VERSION 6
|
||||
#define YY_FLEX_SUBMINOR_VERSION 3
|
||||
#define YY_FLEX_SUBMINOR_VERSION 4
|
||||
#if YY_FLEX_SUBMINOR_VERSION > 0
|
||||
#define FLEX_BETA
|
||||
#endif
|
||||
|
||||
#define yy_create_buffer yy_create_buffer
|
||||
|
||||
#define yy_delete_buffer yy_delete_buffer
|
||||
|
||||
#define yy_scan_buffer yy_scan_buffer
|
||||
|
||||
#define yy_scan_string yy_scan_string
|
||||
|
||||
#define yy_scan_bytes yy_scan_bytes
|
||||
|
||||
#define yy_init_buffer yy_init_buffer
|
||||
|
||||
#define yy_flush_buffer yy_flush_buffer
|
||||
|
||||
#define yy_load_buffer_state yy_load_buffer_state
|
||||
|
||||
#define yy_switch_to_buffer yy_switch_to_buffer
|
||||
|
||||
#define yypush_buffer_state yypush_buffer_state
|
||||
|
||||
#define yypop_buffer_state yypop_buffer_state
|
||||
|
||||
#define yyensure_buffer_stack yyensure_buffer_stack
|
||||
|
||||
#define yylex yylex
|
||||
|
||||
#define yyrestart yyrestart
|
||||
|
||||
#define yylex_init yylex_init
|
||||
|
||||
#define yylex_init_extra yylex_init_extra
|
||||
|
||||
#define yylex_destroy yylex_destroy
|
||||
|
||||
#define yyget_debug yyget_debug
|
||||
|
||||
#define yyset_debug yyset_debug
|
||||
|
||||
#define yyget_extra yyget_extra
|
||||
|
||||
#define yyset_extra yyset_extra
|
||||
|
||||
#define yyget_in yyget_in
|
||||
|
||||
#define yyset_in yyset_in
|
||||
|
||||
#define yyget_out yyget_out
|
||||
|
||||
#define yyset_out yyset_out
|
||||
|
||||
#define yyget_leng yyget_leng
|
||||
|
||||
#define yyget_text yyget_text
|
||||
|
||||
#define yyget_lineno yyget_lineno
|
||||
|
||||
#define yyset_lineno yyset_lineno
|
||||
|
||||
#define yywrap yywrap
|
||||
|
||||
#define yyalloc yyalloc
|
||||
|
||||
#define yyrealloc yyrealloc
|
||||
|
||||
#define yyfree yyfree
|
||||
|
||||
#define yytext yytext
|
||||
|
||||
#define yyleng yyleng
|
||||
|
||||
#define yyin yyin
|
||||
|
||||
#define yyout yyout
|
||||
|
||||
#define yy_flex_debug yy_flex_debug
|
||||
|
||||
#define yylineno yylineno
|
||||
|
||||
/* First, we deal with platform-specific or compiler-specific issues. */
|
||||
|
||||
/* begin standard C headers. */
|
||||
|
@ -166,10 +88,16 @@ typedef unsigned int flex_uint32_t;
|
|||
#define UINT32_MAX (4294967295U)
|
||||
#endif
|
||||
|
||||
#ifndef SIZE_MAX
|
||||
#define SIZE_MAX (~(size_t)0)
|
||||
#endif
|
||||
|
||||
#endif /* ! C99 */
|
||||
|
||||
#endif /* ! FLEXINT_H */
|
||||
|
||||
/* begin standard C++ headers. */
|
||||
|
||||
/* TODO: this is always defined, so inline it */
|
||||
#define yyconst const
|
||||
|
||||
|
@ -295,14 +223,6 @@ extern char *yytext;
|
|||
|
||||
#endif
|
||||
|
||||
#ifndef YY_NO_UNISTD_H
|
||||
/* Special case for "unistd.h", since it is non-ANSI. We include it way
|
||||
* down here because we want the user's section 1 to have been scanned first.
|
||||
* The user has a chance to override it with an option.
|
||||
*/
|
||||
//#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifndef YY_EXTRA_TYPE
|
||||
#define YY_EXTRA_TYPE void *
|
||||
#endif
|
||||
|
@ -400,9 +320,154 @@ extern int yylex (void);
|
|||
#undef YY_DECL
|
||||
#endif
|
||||
|
||||
#line 285 "..\\..\\..\\code\\globalcpp\\parser\\yyLexer.l"
|
||||
#ifndef yy_create_buffer_ALREADY_DEFINED
|
||||
#undef yy_create_buffer
|
||||
#endif
|
||||
#ifndef yy_delete_buffer_ALREADY_DEFINED
|
||||
#undef yy_delete_buffer
|
||||
#endif
|
||||
#ifndef yy_scan_buffer_ALREADY_DEFINED
|
||||
#undef yy_scan_buffer
|
||||
#endif
|
||||
#ifndef yy_scan_string_ALREADY_DEFINED
|
||||
#undef yy_scan_string
|
||||
#endif
|
||||
#ifndef yy_scan_bytes_ALREADY_DEFINED
|
||||
#undef yy_scan_bytes
|
||||
#endif
|
||||
#ifndef yy_init_buffer_ALREADY_DEFINED
|
||||
#undef yy_init_buffer
|
||||
#endif
|
||||
#ifndef yy_flush_buffer_ALREADY_DEFINED
|
||||
#undef yy_flush_buffer
|
||||
#endif
|
||||
#ifndef yy_load_buffer_state_ALREADY_DEFINED
|
||||
#undef yy_load_buffer_state
|
||||
#endif
|
||||
#ifndef yy_switch_to_buffer_ALREADY_DEFINED
|
||||
#undef yy_switch_to_buffer
|
||||
#endif
|
||||
#ifndef yypush_buffer_state_ALREADY_DEFINED
|
||||
#undef yypush_buffer_state
|
||||
#endif
|
||||
#ifndef yypop_buffer_state_ALREADY_DEFINED
|
||||
#undef yypop_buffer_state
|
||||
#endif
|
||||
#ifndef yyensure_buffer_stack_ALREADY_DEFINED
|
||||
#undef yyensure_buffer_stack
|
||||
#endif
|
||||
#ifndef yylex_ALREADY_DEFINED
|
||||
#undef yylex
|
||||
#endif
|
||||
#ifndef yyrestart_ALREADY_DEFINED
|
||||
#undef yyrestart
|
||||
#endif
|
||||
#ifndef yylex_init_ALREADY_DEFINED
|
||||
#undef yylex_init
|
||||
#endif
|
||||
#ifndef yylex_init_extra_ALREADY_DEFINED
|
||||
#undef yylex_init_extra
|
||||
#endif
|
||||
#ifndef yylex_destroy_ALREADY_DEFINED
|
||||
#undef yylex_destroy
|
||||
#endif
|
||||
#ifndef yyget_debug_ALREADY_DEFINED
|
||||
#undef yyget_debug
|
||||
#endif
|
||||
#ifndef yyset_debug_ALREADY_DEFINED
|
||||
#undef yyset_debug
|
||||
#endif
|
||||
#ifndef yyget_extra_ALREADY_DEFINED
|
||||
#undef yyget_extra
|
||||
#endif
|
||||
#ifndef yyset_extra_ALREADY_DEFINED
|
||||
#undef yyset_extra
|
||||
#endif
|
||||
#ifndef yyget_in_ALREADY_DEFINED
|
||||
#undef yyget_in
|
||||
#endif
|
||||
#ifndef yyset_in_ALREADY_DEFINED
|
||||
#undef yyset_in
|
||||
#endif
|
||||
#ifndef yyget_out_ALREADY_DEFINED
|
||||
#undef yyget_out
|
||||
#endif
|
||||
#ifndef yyset_out_ALREADY_DEFINED
|
||||
#undef yyset_out
|
||||
#endif
|
||||
#ifndef yyget_leng_ALREADY_DEFINED
|
||||
#undef yyget_leng
|
||||
#endif
|
||||
#ifndef yyget_text_ALREADY_DEFINED
|
||||
#undef yyget_text
|
||||
#endif
|
||||
#ifndef yyget_lineno_ALREADY_DEFINED
|
||||
#undef yyget_lineno
|
||||
#endif
|
||||
#ifndef yyset_lineno_ALREADY_DEFINED
|
||||
#undef yyset_lineno
|
||||
#endif
|
||||
#ifndef yyget_column_ALREADY_DEFINED
|
||||
#undef yyget_column
|
||||
#endif
|
||||
#ifndef yyset_column_ALREADY_DEFINED
|
||||
#undef yyset_column
|
||||
#endif
|
||||
#ifndef yywrap_ALREADY_DEFINED
|
||||
#undef yywrap
|
||||
#endif
|
||||
#ifndef yyget_lval_ALREADY_DEFINED
|
||||
#undef yyget_lval
|
||||
#endif
|
||||
#ifndef yyset_lval_ALREADY_DEFINED
|
||||
#undef yyset_lval
|
||||
#endif
|
||||
#ifndef yyget_lloc_ALREADY_DEFINED
|
||||
#undef yyget_lloc
|
||||
#endif
|
||||
#ifndef yyset_lloc_ALREADY_DEFINED
|
||||
#undef yyset_lloc
|
||||
#endif
|
||||
#ifndef yyalloc_ALREADY_DEFINED
|
||||
#undef yyalloc
|
||||
#endif
|
||||
#ifndef yyrealloc_ALREADY_DEFINED
|
||||
#undef yyrealloc
|
||||
#endif
|
||||
#ifndef yyfree_ALREADY_DEFINED
|
||||
#undef yyfree
|
||||
#endif
|
||||
#ifndef yytext_ALREADY_DEFINED
|
||||
#undef yytext
|
||||
#endif
|
||||
#ifndef yyleng_ALREADY_DEFINED
|
||||
#undef yyleng
|
||||
#endif
|
||||
#ifndef yyin_ALREADY_DEFINED
|
||||
#undef yyin
|
||||
#endif
|
||||
#ifndef yyout_ALREADY_DEFINED
|
||||
#undef yyout
|
||||
#endif
|
||||
#ifndef yy_flex_debug_ALREADY_DEFINED
|
||||
#undef yy_flex_debug
|
||||
#endif
|
||||
#ifndef yylineno_ALREADY_DEFINED
|
||||
#undef yylineno
|
||||
#endif
|
||||
#ifndef yytables_fload_ALREADY_DEFINED
|
||||
#undef yytables_fload
|
||||
#endif
|
||||
#ifndef yytables_destroy_ALREADY_DEFINED
|
||||
#undef yytables_destroy
|
||||
#endif
|
||||
#ifndef yyTABLES_NAME_ALREADY_DEFINED
|
||||
#undef yyTABLES_NAME
|
||||
#endif
|
||||
|
||||
#line 284 "Z:/openmohaa/code/parser/lex_source.txt"
|
||||
|
||||
|
||||
#line 406 "../../../code/globalcpp/parser/yyLexer.h"
|
||||
#line 471 "Z:/openmohaa/code/parser/generated/yyLexer.h"
|
||||
#undef yyIN_HEADER
|
||||
#endif /* yyHEADER_H */
|
2597
code/parser/generated/yyParser.cpp
Normal file
2597
code/parser/generated/yyParser.cpp
Normal file
File diff suppressed because it is too large
Load diff
156
code/parser/generated/yyParser.hpp
Normal file
156
code/parser/generated/yyParser.hpp
Normal file
|
@ -0,0 +1,156 @@
|
|||
/* A Bison parser, made by GNU Bison 3.8.2. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 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 3 of the License, 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, see <https://www.gnu.org/licenses/>. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
/* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
|
||||
especially those whose name start with YY_ or yy_. They are
|
||||
private implementation details that can be changed or removed. */
|
||||
|
||||
#ifndef YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
|
||||
# define YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED
|
||||
/* Debug traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Token kinds. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
enum yytokentype
|
||||
{
|
||||
YYEMPTY = -2,
|
||||
END = 0, /* END */
|
||||
YYerror = 256, /* error */
|
||||
YYUNDEF = 257, /* "invalid token" */
|
||||
TOKEN_EOL = 258, /* TOKEN_EOL */
|
||||
TOKEN_COMMA = 259, /* TOKEN_COMMA */
|
||||
TOKEN_ASSIGNMENT = 260, /* TOKEN_ASSIGNMENT */
|
||||
TOKEN_PLUS_EQUALS = 261, /* TOKEN_PLUS_EQUALS */
|
||||
TOKEN_MINUS_EQUALS = 262, /* TOKEN_MINUS_EQUALS */
|
||||
TOKEN_MULTIPLY_EQUALS = 263, /* TOKEN_MULTIPLY_EQUALS */
|
||||
TOKEN_DIVIDE_EQUALS = 264, /* TOKEN_DIVIDE_EQUALS */
|
||||
TOKEN_MODULUS_EQUALS = 265, /* TOKEN_MODULUS_EQUALS */
|
||||
TOKEN_AND_EQUALS = 266, /* TOKEN_AND_EQUALS */
|
||||
TOKEN_EXCL_OR_EQUALS = 267, /* TOKEN_EXCL_OR_EQUALS */
|
||||
TOKEN_OR_EQUALS = 268, /* TOKEN_OR_EQUALS */
|
||||
TOKEN_SHIFT_LEFT_EQUALS = 269, /* TOKEN_SHIFT_LEFT_EQUALS */
|
||||
TOKEN_SHIFT_RIGHT_EQUALS = 270, /* TOKEN_SHIFT_RIGHT_EQUALS */
|
||||
TOKEN_TERNARY = 271, /* TOKEN_TERNARY */
|
||||
TOKEN_LOGICAL_OR = 272, /* TOKEN_LOGICAL_OR */
|
||||
TOKEN_LOGICAL_AND = 273, /* TOKEN_LOGICAL_AND */
|
||||
TOKEN_BITWISE_OR = 274, /* TOKEN_BITWISE_OR */
|
||||
TOKEN_BITWISE_EXCL_OR = 275, /* TOKEN_BITWISE_EXCL_OR */
|
||||
TOKEN_BITWISE_AND = 276, /* TOKEN_BITWISE_AND */
|
||||
TOKEN_EQUALITY = 277, /* TOKEN_EQUALITY */
|
||||
TOKEN_INEQUALITY = 278, /* TOKEN_INEQUALITY */
|
||||
TOKEN_LESS_THAN = 279, /* TOKEN_LESS_THAN */
|
||||
TOKEN_LESS_THAN_OR_EQUAL = 280, /* TOKEN_LESS_THAN_OR_EQUAL */
|
||||
TOKEN_GREATER_THAN = 281, /* TOKEN_GREATER_THAN */
|
||||
TOKEN_GREATER_THAN_OR_EQUAL = 282, /* TOKEN_GREATER_THAN_OR_EQUAL */
|
||||
TOKEN_SHIFT_LEFT = 283, /* TOKEN_SHIFT_LEFT */
|
||||
TOKEN_SHIFT_RIGHT = 284, /* TOKEN_SHIFT_RIGHT */
|
||||
TOKEN_PLUS = 285, /* TOKEN_PLUS */
|
||||
TOKEN_MINUS = 286, /* TOKEN_MINUS */
|
||||
TOKEN_MULTIPLY = 287, /* TOKEN_MULTIPLY */
|
||||
TOKEN_DIVIDE = 288, /* TOKEN_DIVIDE */
|
||||
TOKEN_MODULUS = 289, /* TOKEN_MODULUS */
|
||||
TOKEN_LISTENER = 290, /* TOKEN_LISTENER */
|
||||
TOKEN_NEG = 291, /* TOKEN_NEG */
|
||||
TOKEN_NOT = 292, /* TOKEN_NOT */
|
||||
TOKEN_COMPLEMENT = 293, /* TOKEN_COMPLEMENT */
|
||||
TOKEN_FLOAT = 294, /* TOKEN_FLOAT */
|
||||
TOKEN_INTEGER = 295, /* TOKEN_INTEGER */
|
||||
TOKEN_IDENTIFIER = 296, /* TOKEN_IDENTIFIER */
|
||||
TOKEN_STRING = 297, /* TOKEN_STRING */
|
||||
TOKEN_NIL = 298, /* TOKEN_NIL */
|
||||
TOKEN_NULL = 299, /* TOKEN_NULL */
|
||||
TOKEN_LBRACKET = 300, /* TOKEN_LBRACKET */
|
||||
TOKEN_RBRACKET = 301, /* TOKEN_RBRACKET */
|
||||
TOKEN_COLON = 302, /* TOKEN_COLON */
|
||||
TOKEN_SEMICOLON = 303, /* TOKEN_SEMICOLON */
|
||||
TOKEN_DOLLAR = 304, /* TOKEN_DOLLAR */
|
||||
TOKEN_DOUBLE_COLON = 305, /* TOKEN_DOUBLE_COLON */
|
||||
TOKEN_NUMBER = 306, /* TOKEN_NUMBER */
|
||||
TOKEN_LSQUARE = 307, /* TOKEN_LSQUARE */
|
||||
TOKEN_RSQUARE = 308, /* TOKEN_RSQUARE */
|
||||
TOKEN_LPAREN = 309, /* TOKEN_LPAREN */
|
||||
TOKEN_RPAREN = 310, /* TOKEN_RPAREN */
|
||||
TOKEN_INCREMENT = 311, /* TOKEN_INCREMENT */
|
||||
TOKEN_DECREMENT = 312, /* TOKEN_DECREMENT */
|
||||
TOKEN_PERIOD = 313, /* TOKEN_PERIOD */
|
||||
TOKEN_MAKEARRAY = 314, /* TOKEN_MAKEARRAY */
|
||||
TOKEN_ENDARRAY = 315, /* TOKEN_ENDARRAY */
|
||||
TOKEN_CATCH = 316, /* TOKEN_CATCH */
|
||||
TOKEN_TRY = 317, /* TOKEN_TRY */
|
||||
TOKEN_DO = 318, /* TOKEN_DO */
|
||||
TOKEN_FOR = 319, /* TOKEN_FOR */
|
||||
TOKEN_IF = 320, /* TOKEN_IF */
|
||||
TOKEN_ELSE = 321, /* TOKEN_ELSE */
|
||||
TOKEN_SWITCH = 322, /* TOKEN_SWITCH */
|
||||
TOKEN_WHILE = 323, /* TOKEN_WHILE */
|
||||
TOKEN_BREAK = 324, /* TOKEN_BREAK */
|
||||
TOKEN_CASE = 325, /* TOKEN_CASE */
|
||||
TOKEN_CONTINUE = 326, /* TOKEN_CONTINUE */
|
||||
TOKEN_SIZE = 327, /* TOKEN_SIZE */
|
||||
TOKEN_END = 328, /* TOKEN_END */
|
||||
TOKEN_RETURN = 329 /* TOKEN_RETURN */
|
||||
};
|
||||
typedef enum yytokentype yytoken_kind_t;
|
||||
#endif
|
||||
|
||||
/* Value type. */
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
union YYSTYPE
|
||||
{
|
||||
#line 50 "Z:/openmohaa/code/parser/bison_source.txt"
|
||||
|
||||
stype_t s;
|
||||
|
||||
#line 142 "Z:/openmohaa/code/parser/generated/yyParser.hpp"
|
||||
|
||||
};
|
||||
typedef union YYSTYPE YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
|
||||
int yyparse (void);
|
||||
|
||||
|
||||
#endif /* !YY_YY_Z_OPENMOHAA_CODE_PARSER_GENERATED_YYPARSER_HPP_INCLUDED */
|
|
@ -25,7 +25,7 @@
|
|||
*/
|
||||
|
||||
#include "scriptcompiler.h"
|
||||
#include "yyParser.h"
|
||||
#include "./yyParser.hpp"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -38,7 +38,7 @@ void fprintf2( FILE *f, const char *format, ... )
|
|||
vsprintf( buffer, format, va );
|
||||
va_end( va );
|
||||
|
||||
glbs.Printf( buffer );
|
||||
gi.Printf( buffer );
|
||||
}
|
||||
|
||||
#define fprintf fprintf2
|
||||
|
@ -55,7 +55,7 @@ extern yyparsedata parsedata;
|
|||
|
||||
void yylexerror( const char *msg )
|
||||
{
|
||||
glbs.Printf( "%s\n%s", msg, yytext );
|
||||
gi.Printf( "%s\n%s", msg, yytext );
|
||||
assert( 0 );
|
||||
}
|
||||
|
||||
|
@ -129,8 +129,7 @@ static bool UseField( void )
|
|||
%}
|
||||
|
||||
/*%option debug*/
|
||||
|
||||
%option outfile="../../../code/globalcpp/parser/yyLexer.cpp" header-file="../../../code/globalcpp/parser/yyLexer.h"
|
||||
|
||||
%option warn nodefault
|
||||
|
||||
%option noyywrap never-interactive
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,159 +0,0 @@
|
|||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 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 3 of the License, 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, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* 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. */
|
||||
|
||||
#ifndef YY_YY_CODE_GLOBALCPP_PARSER_YYPARSER_H_INCLUDED
|
||||
# define YY_YY_CODE_GLOBALCPP_PARSER_YYPARSER_H_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int yydebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
END = 0,
|
||||
TOKEN_EOL = 258,
|
||||
TOKEN_COMMA = 259,
|
||||
TOKEN_TERNARY = 260,
|
||||
TOKEN_SHIFT_RIGHT_EQUALS = 261,
|
||||
TOKEN_SHIFT_LEFT_EQUALS = 262,
|
||||
TOKEN_OR_EQUALS = 263,
|
||||
TOKEN_EXCL_OR_EQUALS = 264,
|
||||
TOKEN_AND_EQUALS = 265,
|
||||
TOKEN_MODULUS_EQUALS = 266,
|
||||
TOKEN_DIVIDE_EQUALS = 267,
|
||||
TOKEN_MULTIPLY_EQUALS = 268,
|
||||
TOKEN_MINUS_EQUALS = 269,
|
||||
TOKEN_PLUS_EQUALS = 270,
|
||||
TOKEN_ASSIGNMENT = 271,
|
||||
TOKEN_LOGICAL_OR = 272,
|
||||
TOKEN_LOGICAL_AND = 273,
|
||||
TOKEN_BITWISE_OR = 274,
|
||||
TOKEN_BITWISE_EXCL_OR = 275,
|
||||
TOKEN_BITWISE_AND = 276,
|
||||
TOKEN_INEQUALITY = 277,
|
||||
TOKEN_EQUALITY = 278,
|
||||
TOKEN_GREATER_THAN_OR_EQUAL = 279,
|
||||
TOKEN_GREATER_THAN = 280,
|
||||
TOKEN_LESS_THAN_OR_EQUAL = 281,
|
||||
TOKEN_LESS_THAN = 282,
|
||||
TOKEN_SHIFT_RIGHT = 283,
|
||||
TOKEN_SHIFT_LEFT = 284,
|
||||
TOKEN_MINUS = 285,
|
||||
TOKEN_PLUS = 286,
|
||||
TOKEN_MODULUS = 287,
|
||||
TOKEN_DIVIDE = 288,
|
||||
TOKEN_MULTIPLY = 289,
|
||||
TOKEN_LISTENER = 290,
|
||||
TOKEN_COMPLEMENT = 291,
|
||||
TOKEN_NOT = 292,
|
||||
TOKEN_NEG = 293,
|
||||
TOKEN_FLOAT = 294,
|
||||
TOKEN_INTEGER = 295,
|
||||
TOKEN_IDENTIFIER = 296,
|
||||
TOKEN_STRING = 297,
|
||||
TOKEN_NIL = 298,
|
||||
TOKEN_NULL = 299,
|
||||
TOKEN_LBRACKET = 300,
|
||||
TOKEN_RBRACKET = 301,
|
||||
TOKEN_COLON = 302,
|
||||
TOKEN_SEMICOLON = 303,
|
||||
TOKEN_DOLLAR = 304,
|
||||
TOKEN_DOUBLE_COLON = 305,
|
||||
TOKEN_NUMBER = 306,
|
||||
TOKEN_PERIOD = 307,
|
||||
TOKEN_DECREMENT = 308,
|
||||
TOKEN_INCREMENT = 309,
|
||||
TOKEN_RPAREN = 310,
|
||||
TOKEN_LPAREN = 311,
|
||||
TOKEN_RSQUARE = 312,
|
||||
TOKEN_LSQUARE = 313,
|
||||
TOKEN_MAKEARRAY = 314,
|
||||
TOKEN_ENDARRAY = 315,
|
||||
TOKEN_CATCH = 316,
|
||||
TOKEN_TRY = 317,
|
||||
TOKEN_DO = 318,
|
||||
TOKEN_FOR = 319,
|
||||
TOKEN_IF = 320,
|
||||
TOKEN_ELSE = 321,
|
||||
TOKEN_SWITCH = 322,
|
||||
TOKEN_WHILE = 323,
|
||||
TOKEN_BREAK = 324,
|
||||
TOKEN_CASE = 325,
|
||||
TOKEN_CONTINUE = 326,
|
||||
TOKEN_SIZE = 327,
|
||||
TOKEN_END = 328,
|
||||
TOKEN_RETURN = 329
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
typedef union YYSTYPE
|
||||
{
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 53 "..\\..\\..\\code\\globalcpp\\parser\\yyParser.yy"
|
||||
|
||||
stype_t s;
|
||||
|
||||
|
||||
/* Line 2058 of yacc.c */
|
||||
#line 137 "../../../code/globalcpp/parser/yyParser.h"
|
||||
} YYSTYPE;
|
||||
# define YYSTYPE_IS_TRIVIAL 1
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE yylval;
|
||||
|
||||
#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 (void);
|
||||
#else
|
||||
int yyparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_YY_CODE_GLOBALCPP_PARSER_YYPARSER_H_INCLUDED */
|
|
@ -32,8 +32,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
#include "scriptclass.h"
|
||||
#include "scriptexception.h"
|
||||
#include "../parser/parsetree.h"
|
||||
#include "../parser/yyParser.h"
|
||||
#include "../parser/yyLexer.h"
|
||||
#include "../parser/generated/yyParser.hpp"
|
||||
#include "../parser/generated/yyLexer.h"
|
||||
|
||||
ScriptCompiler Compiler;
|
||||
int ScriptCompiler::current_label;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue