include lex
This commit is contained in:
@ -87,6 +87,7 @@
|
||||
%token RESERVE 613
|
||||
%token RELEASE 614
|
||||
%token COMMENT 700
|
||||
%token INCLUDE 901
|
||||
|
||||
//precedence order
|
||||
%left ASSIGN
|
||||
@ -106,6 +107,7 @@
|
||||
|
||||
program:
|
||||
prototype_or_definition_list
|
||||
| include_list prototype_or_definition_list
|
||||
;
|
||||
|
||||
|
||||
@ -123,7 +125,19 @@ prototype_or_definition_list:
|
||||
|
||||
prototype:
|
||||
L_PAREN EXTERNAL R_PAREN FUNCTION ID COLON ID
|
||||
;
|
||||
|
||||
|
||||
|
||||
include_list:
|
||||
include_statement SEMI_COLON include_list
|
||||
| include_statement
|
||||
;
|
||||
|
||||
|
||||
|
||||
include_statement:
|
||||
INCLUDE C_STRING SEMI_COLON
|
||||
;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user