LR1Generator/cmake-build-debug/syntaxInput.txt

89 lines
2.2 KiB
Plaintext
Raw Normal View History

2021-04-30 12:55:56 +00:00
@struct_type -> "struct" "ID" "{" member_list "}" more_struct_type
more_struct_type -> "EOF"
more_struct_type -> ε
member_list -> type_spec declarators ";" member_list
member_list -> ε
2021-04-30 05:33:22 +00:00
type_spec -> base_type_spec
2021-04-30 12:55:56 +00:00
type_spec -> @struct_type
2021-04-30 05:33:22 +00:00
base_type_spec -> floating_pt_type
base_type_spec -> integer_type
base_type_spec -> "char"
base_type_spec -> "boolean"
floating_pt_type -> "float"
floating_pt_type -> "double"
floating_pt_type -> "long" "double"
integer_type -> signed_int
integer_type -> unsigned_int
signed_int -> "short"
signed_int -> "int16"
signed_int -> "long"
signed_int -> "int32"
signed_int -> "long" "long"
signed_int -> "int64"
signed_int -> "int8"
unsigned_int -> "unsigned" "short"
unsigned_int -> "unsigned" "long"
unsigned_int -> "unsigned" "long" "long"
2021-04-30 12:55:56 +00:00
unsigned_int -> "uint16"
unsigned_int -> "uint32"
unsigned_int -> "uint64"
unsigned_int -> "uint8"
2021-04-30 05:33:22 +00:00
declarators -> declarator more_declarators
2021-04-30 12:55:56 +00:00
more_declarators -> "," declarator more_declarators
2021-04-30 05:33:22 +00:00
more_declarators -> ε
declarator -> "ID" more_declarator
more_declarator -> exp_list
more_declarator -> ε
exp_list -> "[" or_expr more_or_expr "]"
2021-04-30 12:55:56 +00:00
more_or_expr -> "," or_expr more_or_expr
2021-04-30 05:33:22 +00:00
more_or_expr -> ε
2021-04-30 12:55:56 +00:00
or_expr -> xor_expr more_xor_expr
more_xor_expr -> "|" xor_expr more_xor_expr
more_xor_expr -> ε
2021-04-30 05:33:22 +00:00
xor_expr -> and_expr more_and_expr
2021-04-30 12:55:56 +00:00
more_and_expr -> "^" and_expr more_and_expr
2021-04-30 05:33:22 +00:00
more_and_expr -> ε
2021-04-30 12:55:56 +00:00
2021-04-30 05:33:22 +00:00
and_expr -> shift_expr more_shift_expr
2021-04-30 12:55:56 +00:00
more_shift_expr -> "&" shift_expr more_shift_expr
2021-04-30 05:33:22 +00:00
more_shift_expr -> ε
2021-04-30 12:55:56 +00:00
2021-04-30 05:33:22 +00:00
shift_expr -> add_expr more_add_expr
2021-04-30 12:55:56 +00:00
more_add_expr -> shift_sign add_expr more_add_expr
2021-04-30 05:33:22 +00:00
shift_sign -> ">>"
shift_sign -> "<<"
2021-04-30 12:55:56 +00:00
more_add_expr -> ε
2021-04-30 05:33:22 +00:00
add_expr -> multi_expr more_multi_expr
2021-04-30 12:55:56 +00:00
more_multi_expr -> multi_sign multi_expr more_multi_expr
2021-04-30 05:33:22 +00:00
multi_sign -> "+"
multi_sign -> "-"
2021-04-30 12:55:56 +00:00
more_multi_expr -> ε
2021-04-30 05:33:22 +00:00
multi_expr -> unary_expr more_unary_expr
2021-04-30 12:55:56 +00:00
more_unary_expr -> unary_sign unary_expr more_unary_expr
2021-04-30 05:33:22 +00:00
unary_sign -> "*"
unary_sign -> "/"
unary_sign -> "%"
2021-04-30 12:55:56 +00:00
more_unary_expr -> ε
2021-04-30 05:33:22 +00:00
unary_expr -> unary_sign_2 unary_declare
unary_sign_2 -> "-"
unary_sign_2 -> "+"
unary_sign_2 -> "~"
2021-04-30 12:55:56 +00:00
unary_sign_2 -> ε
2021-04-30 05:33:22 +00:00
unary_declare -> "INTEGER"
unary_declare -> "STRING"
2021-04-30 12:55:56 +00:00
unary_declare -> BOOLEAN
BOOLEAN -> "TRUE"
BOOLEAN -> "FALSE"