Progress toward preprocessor parsing, lexing works, parsing does not.

This commit is contained in:
2023-07-30 18:55:57 -04:00
parent bfbfae466f
commit 2b63fc27cd
8 changed files with 274 additions and 80 deletions

View File

@ -7,8 +7,8 @@ Access_StaticSymbol, "::"
Ampersand, "&"
Ampersand_DBL, "&&"
Assign_Classifer, ":"
Attribute_Open, "[["
Attribute_Close, "]]"
Attribute_Open, "[["
Attribute_Close, "]]"
BraceCurly_Open, "{"
BraceCurly_Close, "}"
BraceSquare_Open, "["
@ -38,23 +38,24 @@ Module_Export, "export"
Number, "number"
Operator, "operator"
Preprocess_Define, "#define"
Preprocess_If, "#if"
Preprocess_IfDef, "#ifdef"
Preprocess_IfNotDef, "#ifndef"
Preprocess_ElIf, "#elif"
Preprocess_Else, "#else"
Preprocess_EndIf, "#endif"
Preprocess_Include, "#include"
Preprocess_Pragma, "#pragma"
Preprocess_If, "if"
Preprocess_IfDef, "ifdef"
Preprocess_IfNotDef, "ifndef"
Preprocess_ElIf, "elif"
Preprocess_Else, "else"
Preprocess_EndIf, "endif"
Preprocess_Include, "include"
Preprocess_Pragma, "pragma"
Preprocess_Macro, "macro"
Spec_Alignas, "alignas"
Spec_Const, "const"
Spec_Consteval, "consteval"
Spec_Constexpr, "constexpr"
Spec_Constinit, "constinit"
Spec_Explicit, "explicit"
Spec_Explicit, "explicit"
Spec_Extern, "extern"
Spec_Final, "final"
Spec_Global, "global"
Spec_Final, "final"
Spec_Global, "global"
Spec_Inline, "inline"
Spec_Internal_Linkage, "internal"
Spec_LocalPersist, "local_persist"
@ -66,12 +67,12 @@ Spec_Volatile, "volatile"
Star, "*"
Statement_End, ";"
String, "string"
Type_Unsigned, "unsigned"
Type_Unsigned, "unsigned"
Type_Signed, "signed"
Type_Short, "short"
Type_Long, "long"
Type_char, "char"
Type_int, "int"
Type_double, "double"
Type_char, "char"
Type_int, "int"
Type_double, "double"
Varadic_Argument, "..."
Attributes_Start, "__attrib_start__"

1 Invalid __invalid__
7 Ampersand &
8 Ampersand_DBL &&
9 Assign_Classifer :
10 Attribute_Open [[
11 Attribute_Close ]]
12 BraceCurly_Open {
13 BraceCurly_Close }
14 BraceSquare_Open [
38 Number number
39 Operator operator
40 Preprocess_Define #define
41 Preprocess_If #if if
42 Preprocess_IfDef #ifdef ifdef
43 Preprocess_IfNotDef #ifndef ifndef
44 Preprocess_ElIf #elif elif
45 Preprocess_Else #else else
46 Preprocess_EndIf #endif endif
47 Preprocess_Include #include include
48 Preprocess_Pragma #pragma pragma
49 Preprocess_Macro macro
50 Spec_Alignas alignas
51 Spec_Const const
52 Spec_Consteval consteval
53 Spec_Constexpr constexpr
54 Spec_Constinit constinit
55 Spec_Explicit explicit
56 Spec_Extern extern
57 Spec_Final final
58 Spec_Global global
59 Spec_Inline inline
60 Spec_Internal_Linkage internal
61 Spec_LocalPersist local_persist
67 Star *
68 Statement_End ;
69 String string
70 Type_Unsigned unsigned
71 Type_Signed signed
72 Type_Short short
73 Type_Long long
74 Type_char char
75 Type_int int
76 Type_double double
77 Varadic_Argument ...
78 Attributes_Start __attrib_start__