89 lines
2.3 KiB
Plaintext
89 lines
2.3 KiB
Plaintext
@struct_type -> "STRUCT" "ID" "OPENING_BRACE" member_list "CLOSING_BRACE" more_struct_type
|
|
more_struct_type -> "EOF"
|
|
more_struct_type -> ε
|
|
|
|
member_list -> type_spec declarators "SEMICOLON" member_list
|
|
member_list -> ε
|
|
|
|
type_spec -> base_type_spec
|
|
type_spec -> @struct_type
|
|
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"
|
|
unsigned_int -> "UINT16"
|
|
unsigned_int -> "UINT32"
|
|
unsigned_int -> "UINT64"
|
|
unsigned_int -> "UINT8"
|
|
|
|
declarators -> declarator more_declarators
|
|
more_declarators -> "COMMA" declarator more_declarators
|
|
more_declarators -> ε
|
|
|
|
declarator -> "ID" more_declarator
|
|
more_declarator -> exp_list
|
|
more_declarator -> ε
|
|
|
|
exp_list -> "LEFT_BRACKET" or_expr more_or_expr "RIGHT_BRACKET"
|
|
more_or_expr -> "COMMA" or_expr more_or_expr
|
|
more_or_expr -> ε
|
|
|
|
or_expr -> xor_expr more_xor_expr
|
|
more_xor_expr -> "DELIMITER" xor_expr more_xor_expr
|
|
more_xor_expr -> ε
|
|
|
|
xor_expr -> and_expr more_and_expr
|
|
more_and_expr -> "INSERT" and_expr more_and_expr
|
|
more_and_expr -> ε
|
|
|
|
and_expr -> shift_expr more_shift_expr
|
|
more_shift_expr -> "AND" shift_expr more_shift_expr
|
|
more_shift_expr -> ε
|
|
|
|
shift_expr -> add_expr more_add_expr
|
|
more_add_expr -> shift_sign add_expr more_add_expr
|
|
shift_sign -> "RIGHT_SHIFT"
|
|
shift_sign -> "LEFT_SHIFT"
|
|
more_add_expr -> ε
|
|
|
|
add_expr -> multi_expr more_multi_expr
|
|
more_multi_expr -> multi_sign multi_expr more_multi_expr
|
|
multi_sign -> "PLUS"
|
|
multi_sign -> "SUB"
|
|
more_multi_expr -> ε
|
|
|
|
multi_expr -> unary_expr more_unary_expr
|
|
more_unary_expr -> unary_sign unary_expr more_unary_expr
|
|
unary_sign -> "MULT"
|
|
unary_sign -> "SLASH"
|
|
unary_sign -> "PERCENT"
|
|
more_unary_expr -> ε
|
|
|
|
unary_expr -> unary_sign_2 unary_declare
|
|
unary_sign_2 -> "SUB"
|
|
unary_sign_2 -> "PLUS"
|
|
unary_sign_2 -> "TILDE"
|
|
unary_sign_2 -> ε
|
|
unary_declare -> "INTEGER"
|
|
unary_declare -> "STRING"
|
|
unary_declare -> BOOLEAN_VALUE
|
|
|
|
BOOLEAN_VALUE -> "TRUE"
|
|
BOOLEAN_VALUE -> "FALSE" |