diff --git a/src/EditorForm.pas b/src/EditorForm.pas index 90f9e9e..54e74e6 100644 --- a/src/EditorForm.pas +++ b/src/EditorForm.pas @@ -2936,6 +2936,16 @@ procedure TForm1.CreateSimpleMSDOSdBaseProgram; DFrameEditor.SynEdit1.Text := '// This File was created automatically' + sLineBreak + '// Press F2-key to execute it.' + sLineBreak + + '' + sLineBreak + + '# define TESTMACRO 42 // macro for: number' + sLineBreak + + '# define MACRO2 "string" // macro for: string' + sLineBreak + + '' + sLineBreak + + 'parameter bModal' + sLineBreak + + 'local f = new Form1()' + sLineBreak + + 'if bModal == .T.' + sLineBreak + + ' f.open()' + sLineBreak + + 'endif' + sLineBreak + + '' + sLineBreak + 'class foo of form' + sLineBreak + ' with ( this )' + sLineBreak + ' endwith' + sLineBreak + @@ -2944,13 +2954,18 @@ procedure TForm1.CreateSimpleMSDOSdBaseProgram; ' this.pushbutton = new pushbutton( this.container)' + sLineBreak + ' with (this.pushbutton)' + sLineBreak + ' foo.xxx = 4' + sLineBreak + + ' bool = .F.' + sLineBreak + + ' fatz = "sssss"' + sLineBreak + + ' futz = ''xxxx''' + sLineBreak + + ' baz = [ \"dddd 22 ]' + sLineBreak + ' endwith' + sLineBreak + '' + sLineBreak + - ' function dummy1' + sLineBreak + + ' procedure dummy1(p1,p2,p3)' + sLineBreak + ' return' + sLineBreak + '' + sLineBreak + - ' function dummy2' + sLineBreak + - ' return' + sLineBreak + + ' function dummy2(p1)' + sLineBreak + + ' baz = 32' + sLineBreak + + ' return ("foobar" + ddd + "goo")' + sLineBreak + '' + sLineBreak + 'endclass' + sLineBreak; diff --git a/src/EditorFrame.dfm b/src/EditorFrame.dfm index 25118a8..37c0424 100644 --- a/src/EditorFrame.dfm +++ b/src/EditorFrame.dfm @@ -181,11 +181,6 @@ object Frame19: TFrame19 object N2: TMenuItem Caption = '-' end - object Delete1: TMenuItem - Caption = 'Delete' - ShortCut = 46 - OnClick = Delete1Click - end object SelectAll1: TMenuItem Caption = 'Select All' ShortCut = 16449 diff --git a/src/EditorFrame.pas b/src/EditorFrame.pas index abeb5f5..c882211 100644 --- a/src/EditorFrame.pas +++ b/src/EditorFrame.pas @@ -35,7 +35,6 @@ TFrame19 = class(TFrame) Copy1: TMenuItem; Paste1: TMenuItem; N2: TMenuItem; - Delete1: TMenuItem; SelectAll1: TMenuItem; procedure JvImgBtn1Click(Sender: TObject); procedure CopyButtonClick(Sender: TObject); @@ -192,13 +191,6 @@ procedure TFrame19.SynEdit1KeyDown(Sender: TObject; var Key: Word; begin Form1.StartCompileClick(Sender); exit; - end else - if key = VK_DELETE then - begin - SynEdit1.SelStart := SynEdit1.CaretX; - SynEdit1.SelEnd := SynEdit1.SelStart + 1; - SynEdit1.ClearSelection; - exit; end; if ssCtrl in Shift then diff --git a/src/dBaseDSL/dBaseDSL.l b/src/dBaseDSL/dBaseDSL.l index 2b0546e..3e26e2f 100644 --- a/src/dBaseDSL/dBaseDSL.l +++ b/src/dBaseDSL/dBaseDSL.l @@ -36,7 +36,6 @@ NUM ({DIGIT}+) ID ([a-zA-Z]+)|([a-zA-Z0-9_]+) FILE1 [ a-zA-Z0-9\_\.\\]* FILENAME \"(({LETTER}\:\\{FILE1})|({LETTER}\:{FILE1})|({FILE1})*)\" -STRING ("([^"]|"")*") A [a|A] B [b|B] @@ -87,31 +86,82 @@ Z [z|Z] {C}{L}{A}{S}{S} { return TOK_CLASS; } {C}{L}{E}{A}{R} { return TOK_CLEAR; } +{C}{U}{S}{T}{O}{M} { return TOK_CUSTOM; } +{D}{E}{F}{I}{N}{E} { return TOK_DEFINE; } {E}{L}{S}{E} { return TOK_ELSE; } {E}{N}{D}{C}{L}{A}{S}{S} { return TOK_ENDCLASS; } {E}{N}{D}{F}{O}{R} { return TOK_ENDFOR; } {E}{N}{D}{I}{F} { return TOK_ENDIF; } {E}{N}{D}{W}{I}{T}{H} { return TOK_ENDWITH; } +{F}{A}{L}{S}{E} { return TOK_FALSE; } {F}{O}{R} { return TOK_FOR; } {F}{U}{N}{C}{T}{I}{O}{N} { return TOK_FUNCTION; } {I}{F} { return TOK_IF; } +{L}{O}{C}{A}{L} { return TOK_LOCAL; } {N}{E}{W} { return TOK_NEW; } {O}{F} { return TOK_OF; } +{P}{A}{R}{A}{M}{E}{T}{E}{R} { return TOK_PARAMETER; } +{P}{R}{I}{V}{A}{T}{E} { return TOK_PRIVATE; } {P}{R}{O}{C}{E}{D}{U}{R}{E} { return TOK_PROCEDURE; } {R}{E}{T}{U}{R}{N} { return TOK_RETURN; } {S}{E}{T} { return TOK_SET; } {T}{O} { return TOK_TO; } +{T}{R}{U}{E} { return TOK_TRUE; } {W}{I}{T}{H} { return TOK_WITH; } [0-9]+ { yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } [0-9]+\.[0-9]+ { yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } [a-zA-Z_]+|[a-zA-Z0-9_]+ { + // ----------------------------------- + // pattern for: identifier's ... + // ----------------------------------- yylval.node_and_value.name = (char*) malloc( strlen( yytext ) + 1); strcpy( yylval.node_and_value.name, yytext); + return TOK_ID; } +["']((\\.|[^"'])*)["'] { + // ----------------------------------- + // pattern for: "Hello World" + // pattern for: 'Hello World' + // ----------------------------------- + yylval.node_and_value.name = (char*) malloc( strlen( yytext ) + 1); strcpy( + yylval.node_and_value.name, yytext ); + + return TOK_STRING; +} + +\[(\"|\')?((\\.|[^\"\'\]])*)(\"|\')?\] { + // ----------------------------------- + // pattern for: [ "Hallo \" World" ] + // pattern for: [ 'Hello \' World' ] + // ----------------------------------- + char* str = yytext; + int len = 0; + + if (str[0] == '\'' || str[0] == '\"') + str++; + + len = strlen(str); + + if (str[len - 1] == '\'' || str[len - 1] == '\"') + str[len - 1] = '\0' ; + + yylval.node_and_value.name = (char*) malloc( strlen( str ) + 1); strcpy( + yylval.node_and_value.name, str ); + + return TOK_STRING_BRACE; +} + +\.{A}{N}{D}\. { return TOK_AND; } +\.{N}{O}{T}\. { return TOK_NOT; } +\.{O}{R}\. { return TOK_OR; } + +\.{F}\. { return TOK_FALSE; } +\.{T}\. { return TOK_TRUE; } + "==" { return TOK_EQEQ; } "!=" { return TOK_LTGT; } "=>" { return TOK_EQGT; } @@ -127,6 +177,8 @@ Z [z|Z] "/" { return '/'; } \% { return '%'; } +\# { return '#'; } + (\=)|(\:\=) { return TOK_ASSIGN; } \( { return '('; } @@ -135,6 +187,7 @@ Z [z|Z] \] { return ']'; } \{ { return '{'; } \} { return '}'; } +\, { return ','; } \. { return '.'; } . { diff --git a/src/dBaseDSL/dBaseDSL.y b/src/dBaseDSL/dBaseDSL.y index e513ecf..55d3b4f 100644 --- a/src/dBaseDSL/dBaseDSL.y +++ b/src/dBaseDSL/dBaseDSL.y @@ -45,16 +45,18 @@ extern void tree_execute(void); } %token TOK_ID -%token TOK_NUMBER +%token TOK_NUMBER TOK_STRING TOK_STRING_BRACE %token TOK_IF TOK_ELSE TOK_ENDIF %token TOK_EQEQ TOK_EQLT TOK_EQGT TOK_GTEQ TOK_LTEQ TOK_LTGT -%token TOK_ASSIGN +%token TOK_ASSIGN TOK_FALSE TOK_TRUE TOK_AND TOK_NOT TOK_OR +%token TOK_PARAMETER TOK_LOCAL TOK_PRIVATE %token TOK_FUNCTION TOK_PROCEDURE TOK_RETURN TOK_SET TOK_CLEAR %token TOK_FOR TOK_TO TOK_ENDFOR %token TOK_CLASS TOK_OF TOK_ENDCLASS TOK_NEW -%token TOK_WITH TOK_ENDWITH +%token TOK_WITH TOK_ENDWITH TOK_CUSTOM +%token TOK_DEFINE %type number %type factor @@ -62,7 +64,7 @@ extern void tree_execute(void); %type expr %type ident -%type stmt if_else_endif ident_object +%type stmt if_else_endif ident_object param_object %token TOK_YYEOF 0 @@ -80,10 +82,15 @@ program yyerror( buffer ); } ; - + +define_macro + : '#' TOK_DEFINE ident_object + | '#' TOK_DEFINE expr + ; + stmt - : /* empty */ { } - | ident_object TOK_ASSIGN expr + : /* empty */ { } + | ident_object TOK_ASSIGN expr { // ----------------------------- // make a ident node to tree @@ -114,7 +121,7 @@ stmt node_new->next = NULL; node_prev = node_new; - } + } stmt | TOK_FOR ident '=' expr TOK_TO expr { node_new = (struct node *) malloc( sizeof( struct node ) ); node_new->token = (char *) malloc( 12 ); @@ -141,25 +148,95 @@ stmt node_new->next = NULL; node_prev = node_new; } - | TOK_CLASS ident TOK_OF ident stmt TOK_ENDCLASS stmt { MessageBoxA(0,"classss","ooooo",0); + | define_macro TOK_ASSIGN ident_object { } + | define_macro TOK_ASSIGN ident_string { } + | define_macro TOK_ASSIGN expr { } + | define_macro ident_object { } + | define_macro ident_string { } + | define_macro expr { } - | TOK_PROCEDURE ident stmt TOK_RETURN stmt - | TOK_FUNCTION ident stmt TOK_RETURN stmt { + | TOK_CLASS ident_object '(' ident_object ')' TOK_OF '(' ident_object ')' TOK_CUSTOM stmt TOK_ENDCLASS stmt + | TOK_CLASS ident_object TOK_OF '(' ident_object ',' ident_object ')' TOK_CUSTOM stmt TOK_ENDCLASS stmt + | TOK_CLASS ident_object TOK_OF ident_object TOK_CUSTOM stmt TOK_ENDCLASS stmt + | TOK_CLASS ident_object TOK_OF ident_object stmt TOK_ENDCLASS stmt { } - | TOK_WITH '(' ident_object ')' stmt TOK_ENDWITH stmt - | TOK_WITH ident_object stmt TOK_ENDWITH stmt { + | TOK_LOCAL local_object stmt { } - | ident_object TOK_ASSIGN TOK_NEW ident_object '(' ident_object ')' stmt - | ident_object TOK_ASSIGN TOK_NEW ident_object '(' ')' stmt { + | TOK_PRIVATE ident_object stmt { } + | TOK_PARAMETER param_object stmt { } - | if_else_endif + | TOK_PROCEDURE ident args_param stmt TOK_RETURN stmt + | TOK_FUNCTION ident args_param stmt TOK_RETURN return_value stmt { + } + | TOK_WITH '(' ident_object ')' stmt TOK_ENDWITH stmt + | TOK_WITH ident_object stmt TOK_ENDWITH stmt { + } + | ident_object TOK_ASSIGN TOK_NEW ident_object '(' ident_object ')' stmt + | ident_object TOK_ASSIGN TOK_NEW ident_object '(' ')' stmt { + } + | ident_object TOK_ASSIGN ident_object ident_string stmt + | ident_object TOK_ASSIGN ident_object { } stmt + | ident_object TOK_ASSIGN ident_string stmt + | ident_object TOK_ASSIGN TOK_FALSE stmt + | ident_object TOK_ASSIGN TOK_TRUE { } stmt + | ident_object '(' ident_object ')' stmt + | ident_object '(' ')' { } stmt + | if_else_endif ; ident_object : TOK_ID | ident_object '.' ident_object ; + +local_object + : ident_object TOK_ASSIGN TOK_NEW ident_object '(' ident_object ')' + | ident_object TOK_ASSIGN TOK_NEW ident_object '(' ')' + | ident_object + | local_object ',' local_object + ; +param_object + : ident_object + | param_object ',' param_object + ; + +args_param + : /* empty */ + | '(' param_object ')' + | '(' ')' + ; + +ident_string + : TOK_STRING + | TOK_STRING_BRACE + | ident_string '+' ident_string + ; + +return_merge + : /* empty */ + | ident_object '+' ident_object + | ident_object '+' ident_string { + } + | ident_string '+' ident_string + | ident_string '+' ident_object { + } + | ident_object + | ident_string { + } + | TOK_FALSE + | TOK_TRUE + | expr + ; +ident_merge + : return_merge + | return_merge '+' return_merge + ; +return_value + : '(' ident_merge ')' + | ident_merge + ; + expr : expr { @@ -442,59 +519,37 @@ ident } ; +if_ident_and_eqeq : TOK_AND ident_object TOK_EQEQ relation ; +if_ident_and_lteq : TOK_AND ident_object TOK_LTEQ relation ; +if_ident_and_gteq : TOK_AND ident_object TOK_GTEQ relation ; +if_ident_and_ltgt : TOK_AND ident_object TOK_LTGT relation ; + +if_rel + : /* empty */ + | if_ident_and_eqeq + | if_ident_and_lteq + | if_ident_and_gteq + | if_ident_and_ltgt + ; + +relation + : ident_object if_rel + | ident_string if_rel + | expr if_rel + | TOK_FALSE if_rel + | TOK_TRUE if_rel + ; + +if_ident_eqeq : TOK_IF ident_object TOK_EQEQ relation stmt TOK_ENDIF ; +if_ident_lteq : TOK_IF ident_object TOK_LTEQ relation stmt TOK_ENDIF ; +if_ident_gteq : TOK_IF ident_object TOK_GTEQ relation stmt TOK_ENDIF ; +if_ident_ltgt : TOK_IF ident_object TOK_LTGT relation stmt TOK_ENDIF ; + if_else_endif - : TOK_IF expr TOK_EQEQ expr stmt TOK_ENDIF - { - if ($2.value == $4.value) { - /* - $5.next = mknode( - $2.next, - $4.next, - $5.next, - "eqeq"); - $5.prev = $$.next; - */ - } - } - | TOK_IF expr TOK_LTEQ expr stmt TOK_ENDIF - { - if ($2.value <= $4.value) { - /* - $5.next = mknode( - $2.next, - $4.next, - $5.next, - "eqlt"); - $5.prev = $$.next; - */ - } - } - | TOK_IF expr TOK_GTEQ expr stmt TOK_ENDIF - { - if ($2.value >= $4.value) { - /* - $5.next = mknode( - $2.next, - $4.next, - $5.next, - "eqgt"); - $5.prev = $$.next; - */ - } - } - | TOK_IF expr TOK_LTGT expr stmt TOK_ENDIF - { - if ($2.value != $4.value) { - /* - $5.next = mknode( - $2.next, - $4.next, - $5.next, - "lteq"); - $5.prev = $$.next; - */ - } - } + : if_ident_eqeq stmt { } + | if_ident_lteq stmt { } + | if_ident_gteq stmt { } + | if_ident_ltgt stmt { } ; %% diff --git a/src/dBaseDSL/lex.yy.c b/src/dBaseDSL/lex.yy.c index 2614bd4..01d8b56 100644 --- a/src/dBaseDSL/lex.yy.c +++ b/src/dBaseDSL/lex.yy.c @@ -351,8 +351,8 @@ static void yynoreturn yy_fatal_error ( const char* msg ); (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 54 -#define YY_END_OF_BUFFER 55 +#define YY_NUM_RULES 70 +#define YY_END_OF_BUFFER 71 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -360,32 +360,49 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[221] = +static const flex_int16_t yy_accept[375] = { 0, - 10, 10, 8, 8, 55, 53, 10, 11, 11, 53, - 44, 53, 46, 47, 42, 41, 40, 52, 43, 29, - 38, 39, 53, 45, 53, 31, 31, 31, 31, 31, - 31, 31, 31, 31, 31, 31, 31, 48, 49, 50, - 11, 51, 54, 8, 54, 10, 33, 3, 5, 7, - 1, 0, 29, 31, 45, 36, 35, 32, 34, 37, - 31, 31, 0, 31, 31, 0, 31, 31, 0, 21, - 21, 31, 0, 23, 23, 31, 0, 31, 0, 31, - 0, 27, 27, 31, 0, 0, 21, 0, 0, 27, - 0, 21, 8, 0, 9, 3, 4, 5, 6, 1, - - 2, 30, 31, 31, 0, 0, 0, 31, 0, 31, - 0, 0, 19, 19, 31, 0, 19, 22, 22, 31, - 0, 31, 0, 26, 26, 31, 0, 26, 22, 0, - 26, 19, 31, 0, 31, 0, 0, 14, 14, 31, - 31, 31, 31, 0, 0, 0, 0, 0, 14, 31, - 0, 31, 0, 31, 0, 28, 28, 14, 28, 0, - 14, 12, 12, 13, 13, 12, 31, 0, 31, 0, - 17, 17, 31, 0, 17, 31, 0, 31, 0, 31, - 0, 0, 13, 12, 31, 0, 16, 16, 31, 0, - 16, 31, 0, 31, 0, 25, 25, 0, 16, 31, - - 0, 18, 18, 18, 31, 0, 31, 0, 0, 18, - 15, 15, 20, 20, 31, 0, 15, 24, 24, 0 + 10, 10, 8, 8, 71, 69, 10, 11, 11, 69, + 69, 59, 58, 69, 61, 62, 56, 55, 67, 54, + 68, 57, 36, 52, 53, 69, 60, 69, 38, 38, + 38, 38, 38, 38, 38, 38, 38, 38, 38, 38, + 38, 38, 63, 64, 65, 11, 66, 70, 8, 70, + 10, 47, 0, 39, 0, 3, 5, 0, 0, 0, + 0, 0, 0, 7, 1, 0, 36, 38, 60, 50, + 49, 46, 48, 51, 38, 38, 38, 0, 38, 0, + 38, 38, 0, 38, 38, 38, 0, 24, 24, 38, + 0, 38, 0, 27, 27, 38, 38, 0, 38, 0, + + 38, 0, 33, 38, 33, 38, 0, 0, 0, 0, + 40, 0, 0, 24, 0, 0, 33, 0, 0, 24, + 8, 0, 9, 0, 39, 0, 3, 4, 5, 6, + 0, 44, 0, 0, 45, 44, 0, 1, 2, 37, + 38, 38, 0, 38, 0, 0, 0, 0, 38, 0, + 38, 0, 38, 0, 0, 38, 0, 22, 22, 38, + 0, 22, 38, 0, 26, 26, 38, 0, 38, 38, + 0, 0, 0, 0, 38, 0, 32, 32, 38, 0, + 38, 0, 0, 0, 0, 0, 40, 0, 32, 26, + 0, 22, 0, 0, 22, 0, 32, 22, 0, 0, + + 43, 0, 38, 0, 38, 0, 0, 38, 0, 0, + 38, 0, 16, 16, 38, 38, 38, 38, 0, 0, + 0, 0, 0, 16, 38, 0, 38, 0, 0, 38, + 0, 38, 0, 38, 0, 38, 0, 0, 0, 38, + 0, 34, 34, 35, 35, 0, 0, 16, 34, 0, + 16, 35, 0, 0, 16, 0, 0, 16, 41, 42, + 41, 12, 12, 13, 13, 12, 38, 0, 12, 38, + 0, 38, 0, 38, 0, 19, 19, 38, 0, 19, + 21, 21, 38, 0, 21, 25, 25, 38, 0, 38, + 0, 38, 0, 0, 0, 38, 0, 21, 0, 0, + + 13, 0, 19, 12, 21, 25, 0, 13, 12, 14, + 14, 15, 15, 38, 0, 18, 18, 38, 0, 18, + 38, 0, 38, 0, 38, 0, 38, 0, 0, 0, + 31, 31, 15, 14, 0, 14, 15, 0, 14, 38, + 0, 20, 20, 20, 38, 0, 38, 0, 29, 29, + 38, 0, 29, 29, 0, 20, 20, 17, 17, 23, + 23, 38, 0, 38, 0, 0, 17, 17, 28, 28, + 30, 30, 28, 0 } ; static const YY_CHAR yy_ec[256] = @@ -393,17 +410,17 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 5, 1, 1, 1, 6, 7, 1, 8, - 9, 10, 11, 1, 12, 13, 14, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 16, 17, 18, - 19, 20, 1, 1, 21, 22, 23, 24, 25, 26, - 22, 27, 28, 22, 22, 29, 22, 30, 31, 32, - 22, 33, 34, 35, 36, 22, 37, 22, 22, 22, - 38, 1, 39, 1, 22, 1, 21, 22, 23, 24, - - 25, 26, 22, 27, 28, 22, 22, 29, 22, 30, - 31, 32, 22, 33, 34, 35, 36, 22, 37, 22, - 22, 22, 40, 41, 42, 1, 1, 1, 1, 1, + 1, 2, 5, 6, 7, 1, 8, 9, 10, 11, + 12, 13, 14, 15, 16, 17, 18, 19, 19, 19, + 19, 19, 19, 19, 19, 19, 19, 20, 21, 22, + 23, 24, 1, 1, 25, 26, 27, 28, 29, 30, + 26, 31, 32, 26, 26, 33, 34, 35, 36, 37, + 26, 38, 39, 40, 41, 42, 43, 26, 26, 26, + 44, 45, 46, 1, 26, 1, 25, 26, 27, 28, + + 29, 30, 26, 31, 32, 26, 26, 33, 34, 35, + 36, 37, 26, 38, 39, 40, 41, 42, 43, 26, + 26, 26, 47, 48, 49, 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, 1, @@ -420,197 +437,321 @@ static const YY_CHAR yy_ec[256] = 1, 1, 1, 1, 1 } ; -static const YY_CHAR yy_meta[43] = +static const YY_CHAR yy_meta[50] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 1, 3, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 2, 1, 3, 1, + 1, 1, 1, 1, 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 + 3, 3, 3, 1, 1, 1, 1, 1, 1 } ; -static const flex_int16_t yy_base[227] = +static const flex_int16_t yy_base[385] = { 0, - 0, 0, 40, 41, 495, 496, 492, 496, 496, 474, - 496, 485, 496, 496, 481, 496, 496, 496, 35, 33, - 471, 496, 470, 34, 469, 472, 32, 40, 41, 42, - 49, 45, 43, 50, 63, 48, 52, 496, 496, 496, - 80, 496, 496, 483, 52, 483, 496, 481, 480, 496, - 464, 451, 72, 451, 496, 496, 496, 496, 496, 496, - 448, 77, 74, 85, 79, 73, 97, 102, 92, 447, - 496, 86, 87, 446, 496, 114, 100, 119, 101, 122, - 105, 445, 496, 124, 109, 112, 496, 127, 132, 125, - 121, 153, 456, 157, 496, 453, 496, 446, 496, 440, - - 496, 426, 155, 154, 151, 157, 158, 178, 139, 185, - 179, 202, 422, 496, 191, 174, 194, 421, 496, 195, - 200, 197, 140, 417, 496, 219, 204, 168, 188, 223, - 213, 244, 222, 217, 235, 214, 241, 416, 496, 258, - 262, 264, 268, 260, 263, 211, 269, 225, 285, 282, - 259, 283, 277, 292, 279, 382, 496, 288, 286, 303, - 320, 327, 496, 291, 496, 496, 315, 180, 319, 298, - 269, 496, 300, 302, 329, 343, 331, 342, 339, 352, - 335, 353, 338, 374, 358, 306, 247, 496, 360, 359, - 362, 375, 347, 376, 369, 246, 496, 377, 392, 405, - - 380, 244, 496, 388, 410, 394, 412, 397, 414, 424, - 167, 496, 120, 496, 427, 344, 409, 81, 496, 496, - 468, 470, 56, 473, 476, 479 + 0, 0, 47, 48, 900, 901, 897, 901, 901, 875, + 46, 901, 901, 888, 901, 901, 883, 901, 901, 901, + 28, 41, 38, 872, 901, 871, 43, 870, 873, 51, + 50, 52, 53, 56, 54, 64, 58, 78, 76, 88, + 77, 89, 104, 901, 901, 126, 901, 901, 888, 105, + 888, 901, 121, 901, 132, 886, 885, 74, 870, 26, + 81, 869, 135, 901, 882, 865, 63, 837, 901, 901, + 901, 901, 901, 901, 834, 115, 109, 140, 124, 130, + 156, 157, 152, 120, 163, 162, 151, 833, 901, 171, + 84, 173, 98, 830, 901, 174, 177, 170, 175, 180, + + 184, 186, 829, 188, 189, 195, 191, 232, 234, 242, + 901, 208, 217, 901, 224, 222, 228, 226, 234, 264, + 844, 241, 901, 265, 275, 280, 842, 901, 841, 901, + 236, 901, 258, 825, 901, 901, 291, 837, 901, 801, + 276, 292, 284, 282, 273, 279, 289, 303, 297, 185, + 307, 304, 327, 317, 334, 319, 302, 800, 901, 349, + 308, 335, 353, 323, 796, 901, 354, 344, 361, 362, + 357, 343, 359, 369, 371, 220, 795, 901, 379, 305, + 385, 99, 733, 408, 414, 419, 422, 396, 347, 398, + 409, 375, 413, 410, 388, 422, 425, 449, 704, 666, + + 901, 660, 424, 367, 456, 393, 445, 450, 97, 463, + 452, 447, 640, 901, 477, 484, 486, 487, 482, 474, + 473, 478, 481, 506, 498, 397, 504, 437, 508, 512, + 495, 521, 499, 532, 516, 530, 524, 533, 536, 544, + 528, 597, 901, 592, 901, 539, 548, 550, 542, 555, + 549, 556, 567, 573, 901, 577, 570, 601, 901, 901, + 901, 560, 901, 558, 901, 901, 574, 576, 580, 598, + 590, 604, 595, 613, 606, 556, 901, 623, 605, 622, + 555, 901, 636, 616, 618, 531, 901, 638, 627, 639, + 625, 650, 644, 648, 653, 655, 654, 651, 656, 663, + + 665, 680, 671, 901, 678, 682, 676, 674, 706, 505, + 901, 433, 901, 697, 679, 430, 901, 701, 694, 708, + 714, 681, 718, 675, 724, 719, 732, 711, 728, 734, + 428, 901, 901, 729, 742, 901, 720, 755, 756, 752, + 716, 374, 901, 722, 770, 753, 779, 764, 368, 901, + 775, 761, 768, 773, 787, 901, 795, 232, 901, 208, + 901, 791, 769, 809, 802, 803, 807, 808, 168, 901, + 101, 901, 901, 901, 857, 860, 862, 78, 865, 868, + 871, 874, 877, 880 } ; -static const flex_int16_t yy_def[227] = +static const flex_int16_t yy_def[385] = { 0, - 220, 1, 221, 221, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 222, - 220, 220, 220, 220, 220, 223, 223, 223, 223, 223, - 223, 223, 223, 223, 223, 223, 223, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 224, 225, 220, - 226, 220, 222, 222, 220, 220, 220, 220, 220, 220, - 223, 223, 220, 223, 223, 220, 223, 223, 220, 223, - 220, 223, 220, 223, 220, 223, 220, 223, 220, 223, - 220, 223, 220, 223, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 224, 220, 225, 220, 226, - - 220, 220, 223, 223, 220, 220, 220, 223, 220, 223, - 220, 220, 223, 220, 223, 220, 220, 223, 220, 223, - 220, 223, 220, 223, 220, 223, 220, 220, 220, 220, - 220, 220, 223, 220, 223, 220, 220, 223, 220, 223, - 223, 223, 223, 220, 220, 220, 220, 220, 220, 223, - 220, 223, 220, 223, 220, 223, 220, 220, 220, 220, - 220, 223, 220, 223, 220, 220, 223, 220, 223, 220, - 223, 220, 223, 220, 220, 223, 220, 223, 220, 223, - 220, 220, 220, 220, 223, 220, 223, 220, 223, 220, - 220, 223, 220, 223, 220, 223, 220, 220, 220, 223, - - 220, 223, 220, 220, 223, 220, 223, 220, 220, 220, - 223, 220, 223, 220, 223, 220, 220, 223, 220, 0, - 220, 220, 220, 220, 220, 220 + 374, 1, 375, 375, 374, 374, 374, 374, 374, 374, + 376, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 377, 374, 374, 374, 374, 374, 378, 378, + 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, + 378, 378, 379, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 376, 374, 380, 381, 382, 374, 374, 374, + 374, 374, 374, 374, 383, 374, 377, 377, 374, 374, + 374, 374, 374, 374, 378, 378, 378, 374, 378, 374, + 378, 378, 374, 378, 378, 378, 374, 378, 374, 378, + 374, 378, 374, 378, 374, 378, 378, 374, 378, 374, + + 378, 374, 378, 378, 374, 378, 374, 379, 379, 384, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 376, 376, 380, 381, 374, 382, 374, + 374, 374, 374, 374, 374, 374, 374, 383, 374, 374, + 378, 378, 374, 378, 374, 374, 374, 374, 378, 374, + 378, 374, 378, 374, 374, 378, 374, 378, 374, 378, + 374, 374, 378, 374, 378, 374, 378, 374, 378, 378, + 374, 374, 374, 374, 378, 374, 378, 374, 378, 374, + 378, 374, 374, 379, 379, 384, 379, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + + 374, 374, 378, 374, 378, 374, 374, 378, 374, 374, + 378, 374, 378, 374, 378, 378, 378, 378, 374, 374, + 374, 374, 374, 374, 378, 374, 378, 374, 374, 378, + 374, 378, 374, 378, 374, 378, 374, 374, 374, 378, + 374, 378, 374, 378, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 378, 374, 378, 374, 374, 378, 374, 374, 378, + 374, 378, 374, 378, 374, 378, 374, 378, 374, 374, + 378, 374, 378, 374, 374, 378, 374, 378, 374, 378, + 374, 378, 374, 374, 374, 378, 374, 374, 374, 374, + + 374, 374, 374, 374, 374, 374, 374, 374, 374, 378, + 374, 378, 374, 378, 374, 378, 374, 378, 374, 374, + 378, 374, 378, 374, 378, 374, 378, 374, 374, 374, + 378, 374, 374, 374, 374, 374, 374, 374, 374, 378, + 374, 378, 374, 374, 378, 374, 378, 374, 378, 374, + 378, 374, 374, 374, 374, 374, 374, 378, 374, 378, + 374, 378, 374, 378, 374, 374, 374, 374, 378, 374, + 378, 374, 374, 0, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374 } ; -static const flex_int16_t yy_nxt[539] = +static const flex_int16_t yy_nxt[951] = { 0, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, - 26, 26, 27, 26, 28, 29, 26, 30, 26, 31, - 32, 33, 34, 35, 36, 26, 37, 38, 39, 40, - 41, 42, 44, 44, 50, 52, 54, 53, 51, 45, - 45, 57, 58, 59, 54, 54, 54, 54, 61, 54, - 62, 94, 54, 54, 54, 95, 54, 70, 64, 65, - 74, 67, 63, 72, 78, 76, 68, 54, 82, 84, - 66, 69, 71, 77, 52, 75, 53, 80, 83, 73, - 79, 54, 85, 54, 106, 54, 111, 103, 107, 54, - - 54, 104, 110, 81, 86, 87, 109, 85, 88, 89, - 90, 54, 77, 112, 105, 91, 54, 105, 108, 111, - 92, 116, 118, 119, 114, 109, 119, 119, 54, 113, - 121, 115, 117, 54, 54, 123, 54, 114, 54, 125, - 121, 123, 116, 127, 120, 125, 128, 106, 119, 127, - 116, 107, 129, 122, 121, 111, 124, 114, 126, 123, - 109, 116, 125, 139, 127, 114, 94, 130, 54, 54, - 95, 136, 111, 106, 135, 155, 111, 107, 136, 139, - 155, 54, 116, 121, 134, 114, 109, 131, 133, 119, - 134, 137, 54, 132, 136, 134, 151, 134, 136, 54, - - 186, 145, 138, 155, 146, 54, 147, 140, 155, 54, - 141, 54, 142, 150, 151, 148, 151, 152, 139, 144, - 186, 143, 153, 155, 145, 144, 139, 146, 155, 147, - 157, 151, 154, 54, 151, 153, 54, 155, 148, 157, - 153, 170, 149, 136, 157, 156, 165, 139, 155, 54, - 163, 170, 174, 159, 165, 162, 134, 163, 54, 157, - 54, 54, 163, 158, 136, 174, 160, 164, 139, 146, - 157, 147, 54, 165, 163, 165, 54, 134, 54, 155, - 148, 166, 54, 54, 161, 172, 167, 174, 168, 171, - 170, 168, 169, 177, 172, 173, 54, 54, 168, 177, - - 175, 179, 170, 168, 172, 54, 54, 178, 174, 172, - 172, 181, 174, 168, 54, 170, 176, 179, 181, 181, - 165, 163, 177, 179, 180, 175, 181, 179, 166, 54, - 188, 168, 181, 54, 189, 185, 190, 177, 188, 201, - 190, 54, 190, 182, 179, 172, 201, 174, 168, 186, - 170, 187, 183, 163, 177, 186, 54, 54, 193, 188, - 184, 188, 195, 190, 197, 194, 54, 197, 219, 191, - 192, 193, 54, 186, 54, 197, 195, 206, 197, 195, - 193, 196, 195, 193, 219, 203, 202, 206, 203, 54, - 54, 200, 197, 198, 186, 201, 54, 195, 201, 203, - - 203, 193, 204, 197, 208, 205, 188, 206, 190, 208, - 201, 207, 208, 212, 199, 206, 208, 209, 203, 54, - 212, 212, 206, 214, 54, 201, 54, 208, 212, 216, - 54, 54, 210, 219, 214, 54, 54, 216, 211, 213, - 102, 54, 101, 214, 215, 212, 216, 212, 99, 219, - 214, 218, 216, 214, 217, 97, 216, 212, 93, 54, - 54, 54, 54, 220, 217, 102, 101, 219, 43, 43, - 43, 54, 54, 96, 96, 96, 98, 98, 98, 100, - 100, 100, 99, 97, 46, 93, 54, 60, 56, 55, - 49, 48, 47, 46, 220, 5, 220, 220, 220, 220, - - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220 + 6, 7, 8, 9, 10, 11, 12, 13, 14, 11, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 29, 30, 31, 32, 33, + 29, 34, 35, 29, 36, 37, 38, 39, 40, 41, + 29, 29, 42, 43, 6, 44, 45, 46, 47, 49, + 49, 54, 58, 64, 66, 54, 67, 59, 65, 50, + 50, 133, 60, 61, 71, 72, 73, 62, 68, 68, + 68, 68, 68, 133, 68, 63, 68, 84, 79, 66, + 75, 67, 68, 76, 81, 88, 82, 94, 85, 90, + 55, 77, 92, 86, 68, 68, 68, 80, 78, 83, + + 87, 91, 96, 89, 99, 95, 68, 68, 131, 109, + 164, 93, 103, 109, 104, 97, 101, 122, 134, 68, + 106, 131, 123, 100, 105, 98, 54, 68, 134, 245, + 54, 164, 268, 68, 53, 102, 107, 125, 68, 141, + 166, 125, 68, 142, 268, 166, 245, 144, 110, 111, + 112, 136, 156, 149, 113, 114, 145, 107, 115, 150, + 116, 117, 143, 118, 146, 55, 119, 157, 147, 131, + 133, 150, 134, 120, 68, 68, 126, 150, 145, 154, + 68, 68, 137, 157, 153, 161, 68, 148, 159, 68, + 152, 68, 68, 68, 151, 68, 160, 163, 162, 155, + + 158, 172, 68, 152, 154, 173, 68, 168, 169, 161, + 159, 167, 170, 68, 175, 165, 212, 174, 164, 176, + 166, 168, 176, 177, 171, 178, 68, 176, 179, 180, + 182, 178, 212, 178, 181, 180, 180, 183, 182, 183, + 157, 183, 182, 183, 108, 168, 150, 185, 146, 154, + 68, 185, 147, 122, 164, 188, 189, 172, 123, 166, + 241, 173, 152, 199, 190, 159, 180, 241, 161, 154, + 54, 191, 145, 193, 54, 192, 110, 111, 110, 111, + 54, 194, 53, 199, 54, 125, 186, 187, 146, 125, + 164, 154, 147, 150, 68, 172, 157, 200, 161, 173, + + 68, 195, 196, 197, 180, 200, 166, 201, 206, 55, + 68, 198, 209, 206, 203, 68, 205, 204, 199, 55, + 209, 208, 204, 204, 126, 68, 204, 206, 211, 209, + 200, 207, 214, 243, 228, 213, 206, 68, 202, 206, + 226, 204, 209, 220, 212, 68, 221, 231, 222, 226, + 210, 214, 243, 215, 214, 228, 216, 225, 217, 223, + 220, 228, 214, 221, 219, 222, 226, 68, 233, 218, + 231, 68, 68, 226, 219, 227, 223, 230, 232, 68, + 68, 224, 229, 237, 235, 237, 68, 241, 236, 68, + 235, 233, 68, 233, 241, 237, 228, 68, 235, 231, + + 231, 233, 234, 68, 238, 263, 237, 242, 235, 237, + 235, 240, 233, 183, 263, 244, 239, 183, 241, 183, + 233, 108, 231, 183, 185, 282, 243, 183, 185, 212, + 265, 183, 245, 206, 226, 233, 228, 214, 241, 237, + 265, 243, 68, 246, 282, 247, 68, 204, 68, 209, + 214, 68, 110, 111, 235, 245, 248, 250, 110, 111, + 249, 209, 262, 186, 187, 241, 110, 111, 68, 251, + 68, 263, 252, 253, 68, 254, 284, 255, 221, 245, + 256, 271, 265, 263, 284, 267, 270, 257, 209, 241, + 235, 223, 266, 264, 271, 68, 258, 268, 268, 271, + + 265, 263, 68, 265, 68, 68, 273, 277, 275, 272, + 269, 277, 279, 279, 273, 276, 68, 275, 278, 274, + 275, 273, 68, 68, 273, 277, 281, 287, 279, 280, + 68, 275, 289, 277, 279, 277, 282, 279, 273, 68, + 291, 275, 287, 283, 286, 282, 289, 284, 68, 68, + 68, 284, 293, 280, 288, 285, 290, 291, 292, 287, + 291, 293, 68, 291, 293, 297, 291, 282, 289, 289, + 293, 293, 289, 68, 68, 297, 68, 293, 68, 291, + 294, 296, 271, 295, 268, 297, 298, 265, 263, 294, + 268, 297, 68, 297, 284, 299, 268, 266, 282, 287, + + 289, 293, 300, 297, 265, 273, 277, 310, 263, 311, + 68, 271, 284, 311, 301, 68, 68, 304, 313, 315, + 302, 311, 68, 311, 303, 291, 312, 311, 314, 305, + 277, 68, 279, 306, 289, 271, 307, 313, 308, 263, + 284, 68, 315, 317, 319, 313, 315, 322, 309, 322, + 316, 315, 319, 317, 68, 324, 68, 68, 68, 317, + 317, 319, 318, 322, 326, 322, 323, 321, 68, 320, + 319, 328, 326, 68, 324, 328, 261, 327, 325, 324, + 328, 324, 260, 322, 313, 324, 326, 326, 332, 331, + 332, 328, 326, 324, 322, 329, 311, 328, 324, 313, + + 330, 332, 332, 333, 315, 328, 315, 328, 332, 311, + 334, 322, 324, 317, 348, 68, 346, 341, 313, 68, + 259, 332, 348, 336, 343, 328, 341, 335, 346, 315, + 315, 342, 68, 328, 337, 340, 68, 322, 343, 311, + 332, 343, 68, 317, 341, 338, 341, 350, 343, 345, + 68, 352, 349, 339, 359, 344, 350, 347, 352, 348, + 359, 346, 350, 359, 346, 348, 350, 348, 352, 359, + 68, 350, 351, 348, 352, 353, 346, 346, 111, 352, + 341, 354, 352, 350, 350, 343, 343, 361, 68, 355, + 358, 346, 363, 68, 341, 348, 352, 68, 365, 359, + + 361, 363, 356, 357, 360, 365, 370, 362, 365, 68, + 365, 363, 364, 68, 68, 365, 370, 361, 68, 140, + 366, 361, 365, 363, 365, 359, 363, 68, 369, 361, + 372, 372, 365, 359, 367, 372, 372, 371, 370, 139, + 370, 201, 368, 130, 128, 370, 121, 68, 68, 372, + 373, 68, 68, 374, 372, 373, 372, 48, 48, 48, + 53, 53, 53, 68, 68, 108, 108, 108, 124, 124, + 124, 127, 127, 127, 129, 129, 129, 138, 138, 138, + 184, 184, 184, 140, 139, 135, 132, 130, 128, 51, + 121, 68, 74, 70, 69, 57, 56, 52, 51, 374, + + 5, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374 } ; -static const flex_int16_t yy_chk[539] = +static const flex_int16_t yy_chk[951] = { 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 3, 4, 19, 20, 27, 20, 19, 3, - 4, 24, 24, 24, 28, 29, 30, 33, 223, 32, - 27, 45, 36, 31, 34, 45, 37, 30, 28, 28, - 32, 29, 27, 31, 34, 33, 29, 35, 36, 37, - 28, 29, 30, 33, 53, 32, 53, 35, 36, 31, - 34, 62, 37, 65, 63, 218, 66, 62, 63, 64, - - 72, 62, 65, 35, 41, 41, 66, 41, 41, 41, - 41, 67, 41, 66, 63, 41, 68, 62, 64, 65, - 41, 69, 72, 73, 69, 64, 72, 73, 76, 67, - 77, 68, 69, 78, 213, 79, 80, 67, 84, 81, - 77, 79, 68, 85, 76, 81, 86, 88, 86, 85, - 91, 88, 86, 78, 76, 89, 80, 90, 84, 78, - 88, 91, 80, 109, 84, 90, 94, 88, 104, 103, - 94, 105, 89, 92, 104, 123, 92, 92, 107, 109, - 123, 211, 92, 92, 105, 92, 92, 92, 103, 92, - 106, 105, 108, 92, 104, 103, 116, 106, 107, 110, - - 168, 111, 108, 128, 111, 115, 111, 110, 128, 120, - 110, 122, 110, 115, 116, 111, 117, 120, 108, 111, - 168, 110, 121, 129, 112, 110, 112, 112, 129, 112, - 127, 115, 122, 126, 117, 120, 133, 122, 112, 131, - 121, 146, 112, 130, 127, 126, 136, 130, 131, 135, - 134, 146, 148, 131, 136, 133, 130, 134, 202, 126, - 196, 187, 133, 130, 132, 148, 132, 135, 132, 132, - 132, 132, 140, 137, 137, 135, 141, 132, 142, 132, - 132, 137, 143, 171, 132, 144, 140, 144, 144, 142, - 144, 145, 141, 151, 147, 143, 150, 152, 140, 151, - - 144, 153, 141, 145, 142, 164, 154, 152, 143, 147, - 149, 155, 149, 149, 173, 149, 150, 153, 159, 155, - 158, 158, 150, 152, 154, 149, 159, 160, 158, 167, - 170, 160, 154, 169, 173, 167, 174, 160, 170, 186, - 173, 162, 174, 160, 161, 161, 186, 161, 161, 175, - 161, 169, 161, 161, 161, 167, 178, 176, 177, 169, - 161, 175, 179, 175, 181, 178, 180, 183, 216, 175, - 176, 177, 185, 182, 189, 181, 182, 193, 183, 179, - 182, 180, 178, 176, 216, 190, 189, 193, 191, 192, - 194, 185, 180, 182, 184, 191, 156, 184, 185, 190, - - 189, 184, 191, 184, 195, 192, 184, 198, 184, 195, - 198, 194, 198, 201, 184, 192, 194, 198, 199, 200, - 201, 204, 199, 206, 205, 199, 207, 199, 204, 208, - 138, 124, 199, 217, 206, 118, 113, 208, 200, 205, - 102, 215, 100, 209, 207, 200, 209, 209, 98, 217, - 205, 215, 207, 210, 209, 96, 210, 210, 93, 82, - 74, 70, 61, 54, 210, 52, 51, 215, 221, 221, - 221, 222, 222, 224, 224, 224, 225, 225, 225, 226, - 226, 226, 49, 48, 46, 44, 26, 25, 23, 21, - 15, 12, 10, 7, 5, 220, 220, 220, 220, 220, - - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 220, 220, - 220, 220, 220, 220, 220, 220, 220, 220 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, + 4, 11, 21, 22, 23, 11, 23, 21, 22, 3, + 4, 60, 21, 21, 27, 27, 27, 21, 31, 30, + 32, 33, 35, 60, 34, 21, 37, 33, 31, 67, + 378, 67, 36, 30, 32, 34, 32, 37, 33, 35, + 11, 30, 36, 33, 39, 41, 38, 31, 30, 32, + + 33, 35, 38, 34, 39, 37, 40, 42, 58, 43, + 91, 36, 41, 43, 41, 38, 40, 50, 61, 371, + 42, 58, 50, 39, 41, 38, 53, 77, 61, 182, + 53, 91, 209, 76, 55, 40, 42, 55, 84, 76, + 93, 55, 79, 76, 209, 93, 182, 77, 43, 43, + 46, 63, 84, 79, 46, 46, 77, 46, 46, 80, + 46, 46, 76, 46, 78, 53, 46, 84, 78, 63, + 63, 79, 63, 46, 81, 82, 55, 80, 78, 83, + 86, 85, 63, 87, 82, 87, 369, 78, 87, 90, + 83, 92, 96, 99, 81, 97, 86, 90, 87, 83, + + 85, 98, 101, 81, 82, 98, 104, 98, 97, 86, + 85, 96, 97, 106, 99, 92, 150, 98, 90, 100, + 92, 96, 99, 101, 97, 102, 360, 100, 104, 105, + 107, 101, 150, 102, 106, 104, 105, 108, 107, 109, + 112, 108, 106, 109, 110, 112, 113, 110, 115, 116, + 358, 110, 115, 122, 117, 112, 113, 118, 122, 113, + 176, 118, 115, 131, 113, 117, 118, 176, 119, 116, + 124, 115, 119, 118, 124, 117, 108, 108, 109, 109, + 125, 119, 126, 131, 125, 126, 110, 110, 120, 126, + 120, 120, 120, 120, 141, 120, 120, 133, 120, 120, + + 144, 120, 120, 120, 120, 133, 120, 137, 143, 124, + 142, 120, 145, 147, 141, 149, 142, 146, 137, 125, + 145, 144, 143, 141, 126, 151, 146, 148, 149, 144, + 137, 143, 152, 180, 161, 151, 147, 156, 137, 142, + 157, 148, 148, 154, 149, 153, 154, 164, 154, 157, + 148, 152, 180, 153, 151, 161, 153, 156, 153, 154, + 155, 162, 155, 155, 154, 155, 156, 160, 168, 153, + 164, 163, 167, 162, 153, 160, 155, 163, 167, 169, + 170, 155, 162, 171, 172, 173, 349, 189, 170, 175, + 172, 168, 342, 174, 189, 174, 160, 179, 171, 192, + + 163, 167, 169, 181, 171, 204, 173, 179, 169, 170, + 174, 175, 195, 184, 204, 181, 174, 184, 175, 185, + 188, 186, 192, 185, 186, 226, 179, 187, 186, 190, + 206, 187, 181, 191, 188, 195, 194, 191, 190, 193, + 206, 193, 203, 188, 226, 190, 331, 191, 316, 194, + 196, 312, 184, 184, 193, 197, 191, 194, 185, 185, + 193, 196, 203, 186, 186, 197, 187, 187, 208, 196, + 211, 203, 197, 198, 205, 198, 228, 198, 198, 198, + 198, 212, 207, 207, 228, 208, 211, 198, 198, 198, + 198, 198, 207, 205, 212, 215, 198, 208, 210, 211, + + 210, 210, 216, 205, 217, 218, 220, 222, 221, 215, + 210, 219, 223, 219, 219, 217, 225, 219, 218, 216, + 221, 220, 227, 310, 215, 222, 225, 231, 223, 219, + 230, 216, 233, 217, 218, 224, 229, 224, 224, 232, + 235, 224, 231, 227, 230, 225, 233, 229, 236, 286, + 234, 227, 237, 224, 232, 229, 234, 238, 236, 230, + 239, 238, 240, 235, 239, 241, 249, 246, 232, 239, + 249, 237, 246, 281, 276, 241, 264, 236, 262, 234, + 238, 240, 247, 239, 251, 247, 246, 248, 248, 249, + 250, 240, 267, 252, 250, 247, 251, 248, 257, 253, + + 253, 254, 250, 252, 253, 254, 256, 267, 257, 268, + 244, 256, 254, 269, 253, 242, 270, 257, 271, 273, + 254, 267, 272, 268, 256, 258, 270, 269, 272, 258, + 258, 274, 258, 258, 258, 258, 258, 271, 258, 258, + 258, 278, 273, 275, 279, 270, 280, 284, 258, 285, + 274, 272, 279, 275, 283, 289, 288, 290, 213, 280, + 274, 280, 278, 284, 291, 285, 288, 283, 292, 280, + 278, 293, 291, 296, 289, 294, 202, 292, 290, 298, + 295, 295, 200, 283, 299, 288, 290, 294, 297, 296, + 299, 293, 295, 301, 300, 294, 300, 292, 298, 303, + + 295, 297, 296, 299, 302, 305, 306, 302, 308, 307, + 300, 302, 301, 307, 324, 314, 322, 315, 303, 318, + 199, 308, 324, 307, 319, 305, 315, 302, 322, 306, + 309, 318, 321, 309, 309, 314, 323, 309, 320, 309, + 309, 319, 325, 309, 314, 309, 320, 326, 318, 321, + 327, 328, 325, 309, 341, 320, 329, 323, 328, 337, + 344, 321, 330, 341, 334, 323, 326, 337, 329, 344, + 340, 325, 327, 330, 330, 329, 334, 335, 183, 327, + 335, 330, 335, 338, 339, 338, 339, 346, 345, 335, + 340, 339, 348, 351, 339, 339, 339, 347, 352, 340, + + 346, 354, 338, 339, 345, 353, 363, 347, 352, 362, + 354, 348, 351, 177, 165, 353, 363, 345, 158, 140, + 354, 355, 351, 357, 355, 355, 347, 364, 362, 357, + 365, 366, 357, 357, 355, 367, 368, 364, 362, 138, + 366, 134, 357, 129, 127, 368, 121, 103, 94, 365, + 366, 88, 75, 68, 367, 368, 364, 375, 375, 375, + 376, 376, 376, 377, 377, 379, 379, 379, 380, 380, + 380, 381, 381, 381, 382, 382, 382, 383, 383, 383, + 384, 384, 384, 66, 65, 62, 59, 57, 56, 51, + 49, 29, 28, 26, 24, 17, 14, 10, 7, 5, + + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374, + 374, 374, 374, 374, 374, 374, 374, 374, 374, 374 } ; static yy_state_type yy_last_accepting_state; @@ -656,9 +797,9 @@ int yy_dbase_lex_getlines(void) { return yy_dbase_count(); } extern void yyerror(const char* msg); -#line 659 "lex.yy.c" +#line 800 "lex.yy.c" -#line 661 "lex.yy.c" +#line 802 "lex.yy.c" #define INITIAL 0 #define Comment1 1 @@ -876,10 +1017,10 @@ YY_DECL } { -#line 70 "dBaseDSL.l" +#line 69 "dBaseDSL.l" -#line 882 "lex.yy.c" +#line 1023 "lex.yy.c" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -906,13 +1047,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 221 ) + if ( yy_current_state >= 375 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 496 ); + while ( yy_base[yy_current_state] != 901 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -938,276 +1079,391 @@ YY_DECL case 1: YY_RULE_SETUP -#line 72 "dBaseDSL.l" +#line 71 "dBaseDSL.l" { /* DO NOTHING */ } YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 73 "dBaseDSL.l" +#line 72 "dBaseDSL.l" { /* DO NOTHING */ yy_row++; } YY_BREAK case 3: YY_RULE_SETUP -#line 75 "dBaseDSL.l" +#line 74 "dBaseDSL.l" { /* DO NOTHING */ } YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP -#line 76 "dBaseDSL.l" +#line 75 "dBaseDSL.l" { /* DO NOTHING */ yy_row++; } YY_BREAK case 5: YY_RULE_SETUP -#line 78 "dBaseDSL.l" +#line 77 "dBaseDSL.l" { /* DO NOTHING */ } YY_BREAK case 6: /* rule 6 can match eol */ YY_RULE_SETUP -#line 79 "dBaseDSL.l" +#line 78 "dBaseDSL.l" { /* DO NOTHING */ yy_row++; } YY_BREAK case 7: YY_RULE_SETUP -#line 81 "dBaseDSL.l" +#line 80 "dBaseDSL.l" { BEGIN(Comment1); } YY_BREAK case 8: /* rule 8 can match eol */ YY_RULE_SETUP -#line 82 "dBaseDSL.l" +#line 81 "dBaseDSL.l" { yy_row += 1; yy_row++; } YY_BREAK case 9: YY_RULE_SETUP -#line 83 "dBaseDSL.l" +#line 82 "dBaseDSL.l" { BEGIN(INITIAL); } YY_BREAK case 10: YY_RULE_SETUP -#line 85 "dBaseDSL.l" +#line 84 "dBaseDSL.l" { /* empty */ } YY_BREAK case 11: /* rule 11 can match eol */ YY_RULE_SETUP -#line 86 "dBaseDSL.l" +#line 85 "dBaseDSL.l" { yy_col = 1; yy_row++; } YY_BREAK case 12: YY_RULE_SETUP -#line 88 "dBaseDSL.l" +#line 87 "dBaseDSL.l" { return TOK_CLASS; } YY_BREAK case 13: YY_RULE_SETUP -#line 89 "dBaseDSL.l" +#line 88 "dBaseDSL.l" { return TOK_CLEAR; } YY_BREAK case 14: YY_RULE_SETUP -#line 90 "dBaseDSL.l" -{ return TOK_ELSE; } +#line 89 "dBaseDSL.l" +{ return TOK_CUSTOM; } YY_BREAK case 15: YY_RULE_SETUP -#line 91 "dBaseDSL.l" -{ return TOK_ENDCLASS; } +#line 90 "dBaseDSL.l" +{ return TOK_DEFINE; } YY_BREAK case 16: YY_RULE_SETUP -#line 92 "dBaseDSL.l" -{ return TOK_ENDFOR; } +#line 91 "dBaseDSL.l" +{ return TOK_ELSE; } YY_BREAK case 17: YY_RULE_SETUP -#line 93 "dBaseDSL.l" -{ return TOK_ENDIF; } +#line 92 "dBaseDSL.l" +{ return TOK_ENDCLASS; } YY_BREAK case 18: YY_RULE_SETUP -#line 94 "dBaseDSL.l" -{ return TOK_ENDWITH; } +#line 93 "dBaseDSL.l" +{ return TOK_ENDFOR; } YY_BREAK case 19: YY_RULE_SETUP -#line 95 "dBaseDSL.l" -{ return TOK_FOR; } +#line 94 "dBaseDSL.l" +{ return TOK_ENDIF; } YY_BREAK case 20: YY_RULE_SETUP -#line 96 "dBaseDSL.l" -{ return TOK_FUNCTION; } +#line 95 "dBaseDSL.l" +{ return TOK_ENDWITH; } YY_BREAK case 21: YY_RULE_SETUP -#line 97 "dBaseDSL.l" -{ return TOK_IF; } +#line 96 "dBaseDSL.l" +{ return TOK_FALSE; } YY_BREAK case 22: YY_RULE_SETUP -#line 98 "dBaseDSL.l" -{ return TOK_NEW; } +#line 97 "dBaseDSL.l" +{ return TOK_FOR; } YY_BREAK case 23: YY_RULE_SETUP -#line 99 "dBaseDSL.l" -{ return TOK_OF; } +#line 98 "dBaseDSL.l" +{ return TOK_FUNCTION; } YY_BREAK case 24: YY_RULE_SETUP -#line 100 "dBaseDSL.l" -{ return TOK_PROCEDURE; } +#line 99 "dBaseDSL.l" +{ return TOK_IF; } YY_BREAK case 25: YY_RULE_SETUP -#line 101 "dBaseDSL.l" -{ return TOK_RETURN; } +#line 100 "dBaseDSL.l" +{ return TOK_LOCAL; } YY_BREAK case 26: YY_RULE_SETUP -#line 102 "dBaseDSL.l" -{ return TOK_SET; } +#line 101 "dBaseDSL.l" +{ return TOK_NEW; } YY_BREAK case 27: YY_RULE_SETUP -#line 103 "dBaseDSL.l" -{ return TOK_TO; } +#line 102 "dBaseDSL.l" +{ return TOK_OF; } YY_BREAK case 28: YY_RULE_SETUP -#line 104 "dBaseDSL.l" -{ return TOK_WITH; } +#line 103 "dBaseDSL.l" +{ return TOK_PARAMETER; } YY_BREAK case 29: YY_RULE_SETUP -#line 106 "dBaseDSL.l" -{ yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } +#line 104 "dBaseDSL.l" +{ return TOK_PRIVATE; } YY_BREAK case 30: YY_RULE_SETUP -#line 107 "dBaseDSL.l" -{ yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } +#line 105 "dBaseDSL.l" +{ return TOK_PROCEDURE; } YY_BREAK case 31: YY_RULE_SETUP +#line 106 "dBaseDSL.l" +{ return TOK_RETURN; } + YY_BREAK +case 32: +YY_RULE_SETUP +#line 107 "dBaseDSL.l" +{ return TOK_SET; } + YY_BREAK +case 33: +YY_RULE_SETUP +#line 108 "dBaseDSL.l" +{ return TOK_TO; } + YY_BREAK +case 34: +YY_RULE_SETUP #line 109 "dBaseDSL.l" +{ return TOK_TRUE; } + YY_BREAK +case 35: +YY_RULE_SETUP +#line 110 "dBaseDSL.l" +{ return TOK_WITH; } + YY_BREAK +case 36: +YY_RULE_SETUP +#line 112 "dBaseDSL.l" +{ yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } + YY_BREAK +case 37: +YY_RULE_SETUP +#line 113 "dBaseDSL.l" +{ yylval.node_and_value.value = atof(yytext); return TOK_NUMBER; } + YY_BREAK +case 38: +YY_RULE_SETUP +#line 115 "dBaseDSL.l" { + // ----------------------------------- + // pattern for: identifier's ... + // ----------------------------------- yylval.node_and_value.name = (char*) malloc( strlen( yytext ) + 1); strcpy( yylval.node_and_value.name, yytext); + return TOK_ID; } YY_BREAK -case 32: +case 39: +/* rule 39 can match eol */ YY_RULE_SETUP -#line 115 "dBaseDSL.l" +#line 125 "dBaseDSL.l" +{ + // ----------------------------------- + // pattern for: "Hello World" + // pattern for: 'Hello World' + // ----------------------------------- + yylval.node_and_value.name = (char*) malloc( strlen( yytext ) + 1); strcpy( + yylval.node_and_value.name, yytext ); + + return TOK_STRING; +} + YY_BREAK +case 40: +/* rule 40 can match eol */ +YY_RULE_SETUP +#line 136 "dBaseDSL.l" +{ + // ----------------------------------- + // pattern for: [ "Hallo \" World" ] + // pattern for: [ 'Hello \' World' ] + // ----------------------------------- + char* str = yytext; + int len = 0; + + if (str[0] == '\'' || str[0] == '\"') + str++; + + len = strlen(str); + + if (str[len - 1] == '\'' || str[len - 1] == '\"') + str[len - 1] = '\0' ; + + yylval.node_and_value.name = (char*) malloc( strlen( str ) + 1); strcpy( + yylval.node_and_value.name, str ); + + return TOK_STRING_BRACE; +} + YY_BREAK +case 41: +YY_RULE_SETUP +#line 158 "dBaseDSL.l" +{ return TOK_AND; } + YY_BREAK +case 42: +YY_RULE_SETUP +#line 159 "dBaseDSL.l" +{ return TOK_NOT; } + YY_BREAK +case 43: +YY_RULE_SETUP +#line 160 "dBaseDSL.l" +{ return TOK_OR; } + YY_BREAK +case 44: +YY_RULE_SETUP +#line 162 "dBaseDSL.l" +{ return TOK_FALSE; } + YY_BREAK +case 45: +YY_RULE_SETUP +#line 163 "dBaseDSL.l" +{ return TOK_TRUE; } + YY_BREAK +case 46: +YY_RULE_SETUP +#line 165 "dBaseDSL.l" { return TOK_EQEQ; } YY_BREAK -case 33: +case 47: YY_RULE_SETUP -#line 116 "dBaseDSL.l" +#line 166 "dBaseDSL.l" { return TOK_LTGT; } YY_BREAK -case 34: +case 48: YY_RULE_SETUP -#line 117 "dBaseDSL.l" +#line 167 "dBaseDSL.l" { return TOK_EQGT; } YY_BREAK -case 35: +case 49: YY_RULE_SETUP -#line 118 "dBaseDSL.l" +#line 168 "dBaseDSL.l" { return TOK_EQLT; } YY_BREAK -case 36: +case 50: YY_RULE_SETUP -#line 119 "dBaseDSL.l" +#line 169 "dBaseDSL.l" { return TOK_LTEQ; } YY_BREAK -case 37: +case 51: YY_RULE_SETUP -#line 120 "dBaseDSL.l" +#line 170 "dBaseDSL.l" { return TOK_GTEQ; } YY_BREAK -case 38: +case 52: YY_RULE_SETUP -#line 122 "dBaseDSL.l" +#line 172 "dBaseDSL.l" { return ':'; } YY_BREAK -case 39: +case 53: YY_RULE_SETUP -#line 123 "dBaseDSL.l" +#line 173 "dBaseDSL.l" { return ';'; } YY_BREAK -case 40: +case 54: YY_RULE_SETUP -#line 124 "dBaseDSL.l" +#line 174 "dBaseDSL.l" { return '-'; } YY_BREAK -case 41: +case 55: YY_RULE_SETUP -#line 125 "dBaseDSL.l" +#line 175 "dBaseDSL.l" { return '+'; } YY_BREAK -case 42: +case 56: YY_RULE_SETUP -#line 126 "dBaseDSL.l" +#line 176 "dBaseDSL.l" { return '*'; } YY_BREAK -case 43: +case 57: YY_RULE_SETUP -#line 127 "dBaseDSL.l" +#line 177 "dBaseDSL.l" { return '/'; } YY_BREAK -case 44: +case 58: YY_RULE_SETUP -#line 128 "dBaseDSL.l" +#line 178 "dBaseDSL.l" { return '%'; } YY_BREAK -case 45: +case 59: YY_RULE_SETUP -#line 130 "dBaseDSL.l" +#line 180 "dBaseDSL.l" +{ return '#'; } + YY_BREAK +case 60: +YY_RULE_SETUP +#line 182 "dBaseDSL.l" { return TOK_ASSIGN; } YY_BREAK -case 46: +case 61: YY_RULE_SETUP -#line 132 "dBaseDSL.l" +#line 184 "dBaseDSL.l" { return '('; } YY_BREAK -case 47: +case 62: YY_RULE_SETUP -#line 133 "dBaseDSL.l" +#line 185 "dBaseDSL.l" { return ')'; } YY_BREAK -case 48: +case 63: YY_RULE_SETUP -#line 134 "dBaseDSL.l" +#line 186 "dBaseDSL.l" { return '['; } YY_BREAK -case 49: +case 64: YY_RULE_SETUP -#line 135 "dBaseDSL.l" +#line 187 "dBaseDSL.l" { return ']'; } YY_BREAK -case 50: +case 65: YY_RULE_SETUP -#line 136 "dBaseDSL.l" +#line 188 "dBaseDSL.l" { return '{'; } YY_BREAK -case 51: +case 66: YY_RULE_SETUP -#line 137 "dBaseDSL.l" +#line 189 "dBaseDSL.l" { return '}'; } YY_BREAK -case 52: +case 67: +YY_RULE_SETUP +#line 190 "dBaseDSL.l" +{ return ','; } + YY_BREAK +case 68: YY_RULE_SETUP -#line 138 "dBaseDSL.l" +#line 191 "dBaseDSL.l" { return '.'; } YY_BREAK -case 53: +case 69: YY_RULE_SETUP -#line 140 "dBaseDSL.l" +#line 193 "dBaseDSL.l" { char buffer[200]; sprintf( buffer, "Unrecognized character: %s\n", yytext ); @@ -1216,15 +1472,15 @@ YY_RULE_SETUP YY_BREAK case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(Comment1): -#line 146 "dBaseDSL.l" +#line 199 "dBaseDSL.l" { return TOK_YYEOF; } YY_BREAK -case 54: +case 70: YY_RULE_SETUP -#line 147 "dBaseDSL.l" +#line 200 "dBaseDSL.l" ECHO; YY_BREAK -#line 1227 "lex.yy.c" +#line 1483 "lex.yy.c" case YY_END_OF_BUFFER: { @@ -1519,7 +1775,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 221 ) + if ( yy_current_state >= 375 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -1547,11 +1803,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 221 ) + if ( yy_current_state >= 375 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 220); + yy_is_jam = (yy_current_state == 374); return yy_is_jam ? 0 : yy_current_state; } @@ -2227,7 +2483,7 @@ void yyfree (void * ptr ) #define YYTABLES_NAME "yytables" -#line 147 "dBaseDSL.l" +#line 200 "dBaseDSL.l" void EXPORT diff --git a/test.pl b/test.pl index 3c33036..6e1ee8b 100644 --- a/test.pl +++ b/test.pl @@ -1,5 +1,15 @@ // This File was created automatically // Press F2-key to execute it. + +# define TESTMACRO 42 // macro for: number +# define MACRO2 "string" // macro for: string + +parameter bModal +local f = new Form1() +if bModal == .T. + f.open() +endif + class foo of form with ( this ) endwith @@ -8,13 +18,18 @@ this.pushbutton = new pushbutton( this.container) with (this.pushbutton) foo.xxx = 4 + bool = .F. + fatz = "sssss" + futz = 'xxxx' + baz = [ \"dddd 22 ] endwith - function dummy1 + procedure dummy1(p1,p2,p3) return - function dummy2 - return + function dummy2(p1) + baz = 32 + return ("foobar" + ddd + "goo") endclass