190 |
"%expect" return PERCENT_EXPECT; |
"%expect" return PERCENT_EXPECT; |
191 |
"%file-prefix" return PERCENT_FILE_PREFIX; |
"%file-prefix" return PERCENT_FILE_PREFIX; |
192 |
"%fixed"[-_]"output"[-_]"files" return PERCENT_YACC; |
"%fixed"[-_]"output"[-_]"files" return PERCENT_YACC; |
193 |
|
"%initial-action" token_type = PERCENT_INITIAL_ACTION; BEGIN SC_PRE_CODE; |
194 |
"%glr-parser" return PERCENT_GLR_PARSER; |
"%glr-parser" return PERCENT_GLR_PARSER; |
195 |
"%left" return PERCENT_LEFT; |
"%left" return PERCENT_LEFT; |
196 |
"%lex-param" token_type = PERCENT_LEX_PARAM; BEGIN SC_PRE_CODE; |
"%lex-param" token_type = PERCENT_LEX_PARAM; BEGIN SC_PRE_CODE; |
650 |
|
|
651 |
%% |
%% |
652 |
|
|
653 |
/* Keeps track of the maximum number of semantic values to the left of |
/* Keeps track of the maximum number of semantic values to the left of |
654 |
a handle (those referenced by $0, $-1, etc.) are required by the |
a handle (those referenced by $0, $-1, etc.) are required by the |
655 |
semantic actions of this grammar. */ |
semantic actions of this grammar. */ |
656 |
int max_left_semantic_context = 0; |
int max_left_semantic_context = 0; |
657 |
|
|
808 |
} |
} |
809 |
|
|
810 |
|
|
811 |
/*-----------------------------------------------------------------. |
/*----------------------------------------------------------------. |
812 |
| Dispatch onto handle_action_dollar, or handle_destructor_dollar, | |
| Map `$?' onto the proper M4 symbol, depending on its TOKEN_TYPE | |
813 |
| depending upon TOKEN_TYPE. | |
| (are we in an action?). | |
814 |
`-----------------------------------------------------------------*/ |
`----------------------------------------------------------------*/ |
815 |
|
|
816 |
static void |
static void |
817 |
handle_dollar (int token_type, char *text, location loc) |
handle_dollar (int token_type, char *text, location loc) |
824 |
break; |
break; |
825 |
|
|
826 |
case PERCENT_DESTRUCTOR: |
case PERCENT_DESTRUCTOR: |
827 |
|
case PERCENT_INITIAL_ACTION: |
828 |
case PERCENT_PRINTER: |
case PERCENT_PRINTER: |
829 |
if (text[1] == '$') |
if (text[1] == '$') |
830 |
{ |
{ |
877 |
} |
} |
878 |
|
|
879 |
|
|
880 |
/*-------------------------------------------------------------------. |
/*----------------------------------------------------------------. |
881 |
| Dispatch onto handle_action_at, or handle_destructor_at, depending | |
| Map `@?' onto the proper M4 symbol, depending on its TOKEN_TYPE | |
882 |
| upon CODE_KIND. | |
| (are we in an action?). | |
883 |
`-------------------------------------------------------------------*/ |
`----------------------------------------------------------------*/ |
884 |
|
|
885 |
static void |
static void |
886 |
handle_at (int token_type, char *text, location loc) |
handle_at (int token_type, char *text, location loc) |
891 |
handle_action_at (text, loc); |
handle_action_at (text, loc); |
892 |
return; |
return; |
893 |
|
|
894 |
|
case PERCENT_INITIAL_ACTION: |
895 |
case PERCENT_DESTRUCTOR: |
case PERCENT_DESTRUCTOR: |
896 |
case PERCENT_PRINTER: |
case PERCENT_PRINTER: |
897 |
if (text[1] == '$') |
if (text[1] == '$') |