include lex

This commit is contained in:
Scarlett
2025-05-04 17:33:59 -04:00
parent f43ab2452a
commit 3a33cc0f88
6 changed files with 22 additions and 3 deletions

View File

@ -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
;