Add SyntaxTree
This commit is contained in:
parent
afd82ebd74
commit
9bbc406364
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
1
.idea/.name
generated
Normal file
1
.idea/.name
generated
Normal file
@ -0,0 +1 @@
|
||||
syntaxParser
|
2
.idea/SyntaxParser.iml
generated
Normal file
2
.idea/SyntaxParser.iml
generated
Normal file
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
14
.idea/deployment.xml
generated
Normal file
14
.idea/deployment.xml
generated
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="PublishConfigData" remoteFilesAllowedToDisappearOnAutoupload="false">
|
||||
<serverData>
|
||||
<paths name="WSL (283348aa-7537-4053-bf4d-324908fe7e53)">
|
||||
<serverdata>
|
||||
<mappings>
|
||||
<mapping local="$PROJECT_DIR$" web="/" />
|
||||
</mappings>
|
||||
</serverdata>
|
||||
</paths>
|
||||
</serverData>
|
||||
</component>
|
||||
</project>
|
12
.idea/encodings.xml
generated
Normal file
12
.idea/encodings.xml
generated
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-debug/LR1Automata.txt" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-debug/outToken.txt" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-debug/test" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-debug/test/test15_complex.txt" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-debug/tokenOut.txt" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/cmake-build-release/test" charset="UTF-8" />
|
||||
<file url="PROJECT" charset="GBK" />
|
||||
</component>
|
||||
</project>
|
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||
</project>
|
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/SyntaxParser.iml" filepath="$PROJECT_DIR$/.idea/SyntaxParser.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
728
cmake-build-debug/SyntaxOut.txt
Normal file
728
cmake-build-debug/SyntaxOut.txt
Normal file
@ -0,0 +1,728 @@
|
||||
struct_type<STRUCT, ID, OPENING_BRACE, CLOSING_BRACE>
|
||||
| member_list<SEMICOLON>
|
||||
| | type_spec<>
|
||||
| | | base_type_spec<>
|
||||
| | | | floating_pt_type<FLOAT>
|
||||
| | declarators<>
|
||||
| | | declarator<ID>
|
||||
| | | | more_declarator<>
|
||||
| | | more_declarators<>
|
||||
| | member_list<SEMICOLON>
|
||||
| | | type_spec<>
|
||||
| | | | base_type_spec<>
|
||||
| | | | | floating_pt_type<DOUBLE>
|
||||
| | | declarators<>
|
||||
| | | | declarator<ID>
|
||||
| | | | | more_declarator<>
|
||||
| | | | more_declarators<COMMA>
|
||||
| | | | | declarator<ID>
|
||||
| | | | | | more_declarator<>
|
||||
| | | | | more_declarators<COMMA>
|
||||
| | | | | | declarator<ID>
|
||||
| | | | | | | more_declarator<>
|
||||
| | | | | | more_declarators<>
|
||||
| | | member_list<SEMICOLON>
|
||||
| | | | type_spec<>
|
||||
| | | | | base_type_spec<>
|
||||
| | | | | | floating_pt_type<LONG, DOUBLE>
|
||||
| | | | declarators<>
|
||||
| | | | | declarator<ID>
|
||||
| | | | | | more_declarator<>
|
||||
| | | | | more_declarators<>
|
||||
| | | | member_list<SEMICOLON>
|
||||
| | | | | type_spec<>
|
||||
| | | | | | struct_type<STRUCT, ID, OPENING_BRACE, CLOSING_BRACE>
|
||||
| | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | type_spec<>
|
||||
| | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | signed_int<INT8>
|
||||
| | | | | | | | declarators<>
|
||||
| | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | more_declarators<>
|
||||
| | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | signed_int<INT16>
|
||||
| | | | | | | | | declarators<>
|
||||
| | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | signed_int<INT32>
|
||||
| | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | signed_int<INT64>
|
||||
| | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | signed_int<SHORT>
|
||||
| | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | signed_int<LONG>
|
||||
| | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | | signed_int<LONG, LONG>
|
||||
| | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | member_list<>
|
||||
| | | | | | | more_struct_type<>
|
||||
| | | | | declarators<>
|
||||
| | | | | | declarator<ID>
|
||||
| | | | | | | more_declarator<>
|
||||
| | | | | | more_declarators<COMMA>
|
||||
| | | | | | | declarator<ID>
|
||||
| | | | | | | | more_declarator<>
|
||||
| | | | | | | more_declarators<>
|
||||
| | | | | member_list<SEMICOLON>
|
||||
| | | | | | type_spec<>
|
||||
| | | | | | | struct_type<STRUCT, ID, OPENING_BRACE, CLOSING_BRACE>
|
||||
| | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | unsigned_int<UINT8>
|
||||
| | | | | | | | | declarators<>
|
||||
| | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | unsigned_int<UINT16>
|
||||
| | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | unsigned_int<UINT32>
|
||||
| | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | unsigned_int<UINT64>
|
||||
| | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | unsigned_int<UNSIGNED, SHORT>
|
||||
| | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | | unsigned_int<UNSIGNED, LONG>
|
||||
| | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | | | unsigned_int<UNSIGNED, LONG, LONG>
|
||||
| | | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | | member_list<>
|
||||
| | | | | | | | more_struct_type<>
|
||||
| | | | | | declarators<>
|
||||
| | | | | | | declarator<ID>
|
||||
| | | | | | | | more_declarator<>
|
||||
| | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | declarator<ID>
|
||||
| | | | | | | | | more_declarator<>
|
||||
| | | | | | | | more_declarators<>
|
||||
| | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | type_spec<>
|
||||
| | | | | | | | base_type_spec<CHAR>
|
||||
| | | | | | | declarators<>
|
||||
| | | | | | | | declarator<ID>
|
||||
| | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | unary_declare<STRING>
|
||||
| | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | multi_sign<PLUS>
|
||||
| | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_declare<STRING>
|
||||
| | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_declare<STRING>
|
||||
| | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_declare<STRING>
|
||||
| | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | more_declarators<>
|
||||
| | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | type_spec<>
|
||||
| | | | | | | | | base_type_spec<BOOLEAN>
|
||||
| | | | | | | | declarators<>
|
||||
| | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | more_and_expr<INSERT>
|
||||
| | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | more_shift_expr<AND>
|
||||
| | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_shift_expr<AND>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_declare<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | BOOLEAN_VALUE<TRUE>
|
||||
| | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | more_xor_expr<DELIMITER>
|
||||
| | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | BOOLEAN_VALUE<FALSE>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<TILDE>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | BOOLEAN_VALUE<FALSE>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | more_xor_expr<DELIMITER>
|
||||
| | | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<TILDE>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | BOOLEAN_VALUE<TRUE>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | | more_declarators<>
|
||||
| | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | signed_int<LONG>
|
||||
| | | | | | | | | declarators<>
|
||||
| | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_sign<RIGHT_SHIFT>
|
||||
| | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | shift_sign<LEFT_SHIFT>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign<MULT>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign<SLASH>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_sign<PERCENT>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | | more_or_expr<COMMA>
|
||||
| | | | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | multi_sign<PLUS>
|
||||
| | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | multi_sign<SUB>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | base_type_spec<BOOLEAN>
|
||||
| | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | more_and_expr<INSERT>
|
||||
| | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<AND>
|
||||
| | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | more_xor_expr<DELIMITER>
|
||||
| | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_sign_2<SUB>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | shift_sign<RIGHT_SHIFT>
|
||||
| | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | more_shift_expr<AND>
|
||||
| | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | shift_sign<LEFT_SHIFT>
|
||||
| | | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<SUB>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | multi_sign<SUB>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | multi_sign<PLUS>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign<MULT>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign<SLASH>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign<PERCENT>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | struct_type<STRUCT, ID, OPENING_BRACE, CLOSING_BRACE>
|
||||
| | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | | floating_pt_type<FLOAT>
|
||||
| | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | | base_type_spec<>
|
||||
| | | | | | | | | | | | | | | | | integer_type<>
|
||||
| | | | | | | | | | | | | | | | | | signed_int<LONG>
|
||||
| | | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | | | struct_type<STRUCT, ID, OPENING_BRACE, CLOSING_BRACE>
|
||||
| | | | | | | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | | | | | | base_type_spec<BOOLEAN>
|
||||
| | | | | | | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | more_shift_expr<AND>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<INTEGER>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | | | | | | member_list<SEMICOLON>
|
||||
| | | | | | | | | | | | | | | | | | | | type_spec<>
|
||||
| | | | | | | | | | | | | | | | | | | | | base_type_spec<CHAR>
|
||||
| | | | | | | | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | exp_list<LEFT_BRACKET, RIGHT_BRACKET>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | or_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_sign_2<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unary_declare<STRING>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | more_unary_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | more_multi_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | | more_add_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | | more_shift_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | | more_and_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | | more_xor_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | | | | more_or_expr<>
|
||||
| | | | | | | | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | | | | | | | member_list<>
|
||||
| | | | | | | | | | | | | | | | | | more_struct_type<>
|
||||
| | | | | | | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | | | | | | member_list<>
|
||||
| | | | | | | | | | | | | more_struct_type<>
|
||||
| | | | | | | | | | | declarators<>
|
||||
| | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | more_declarators<COMMA>
|
||||
| | | | | | | | | | | | | declarator<ID>
|
||||
| | | | | | | | | | | | | | more_declarator<>
|
||||
| | | | | | | | | | | | | more_declarators<>
|
||||
| | | | | | | | | | | member_list<>
|
||||
| more_struct_type<EOF>
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include <GrammarResourcePool.h>
|
||||
#include <AnalyseTableGenerator.h>
|
||||
#include <SyntaxTree.h>
|
||||
|
||||
|
||||
|
||||
@ -22,6 +23,8 @@ class SyntaxParser {
|
||||
|
||||
std::wofstream output;
|
||||
|
||||
std::wofstream treeOutput;
|
||||
|
||||
const GrammarResourcePool *pool;
|
||||
|
||||
const AnalyseTableGenerator *atg;
|
||||
@ -32,6 +35,8 @@ class SyntaxParser {
|
||||
|
||||
std::stack<int> status_stack;
|
||||
|
||||
std::stack<TreeNode *> tree_stack;
|
||||
|
||||
std::vector<size_t> lines_index;
|
||||
|
||||
std::wstringstream string_buffer;
|
||||
@ -42,21 +47,27 @@ class SyntaxParser {
|
||||
|
||||
static std::pair<std::wstring, std::wstring> get_token_info(const std::wstring &token);
|
||||
|
||||
SyntaxTree syntaxTree;
|
||||
|
||||
public:
|
||||
|
||||
SyntaxParser(const GrammarResourcePool *pool, const AnalyseTableGenerator *atg):
|
||||
input("tokenOut.txt", std::ios::binary),
|
||||
pool(pool),
|
||||
atg(atg),
|
||||
output("SyntaxOut.txt", std::ios::binary){
|
||||
output("AnalyseOut.txt", std::ios::binary),
|
||||
treeOutput("SyntaxOut.txt", std::ios::binary){
|
||||
|
||||
auto* codeCvtToUTF8= new std::codecvt_utf8<wchar_t>;
|
||||
input.imbue(std::locale(input.getloc(), codeCvtToUTF8));
|
||||
output.imbue(std::locale(output.getloc(), codeCvtToUTF8));
|
||||
treeOutput.imbue(std::locale(output.getloc(), codeCvtToUTF8));
|
||||
}
|
||||
|
||||
~SyntaxParser() {
|
||||
input.close();
|
||||
output.close();
|
||||
treeOutput.close();
|
||||
}
|
||||
|
||||
// 得到所有的产生式
|
||||
@ -69,9 +80,12 @@ public:
|
||||
// 自底向上语法分析
|
||||
void parse();
|
||||
|
||||
void printError(std::wofstream &errOutput);
|
||||
|
||||
void printError();
|
||||
|
||||
void printDone();
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
69
include/SyntaxTree.h
Normal file
69
include/SyntaxTree.h
Normal file
@ -0,0 +1,69 @@
|
||||
//
|
||||
// Created by Administrator on 2021/5/12.
|
||||
//
|
||||
|
||||
#ifndef SYNTAXPARSER_SYNTAXTREE_H
|
||||
#define SYNTAXPARSER_SYNTAXTREE_H
|
||||
|
||||
#include <stack>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <fstream>
|
||||
|
||||
class TreeNode {
|
||||
const int nodeType;
|
||||
TreeNode *father = nullptr;
|
||||
std::vector<std::wstring> infoVec;
|
||||
std::vector<TreeNode *> children;
|
||||
|
||||
public:
|
||||
|
||||
explicit TreeNode(int nodeType) : nodeType(nodeType) {
|
||||
|
||||
}
|
||||
|
||||
void addInfo(const std::wstring& info) {
|
||||
infoVec.push_back(info);
|
||||
}
|
||||
|
||||
void setFather(TreeNode *fatherNode) {
|
||||
if(fatherNode == this) {
|
||||
throw std::runtime_error("Illegal Tree Structure");
|
||||
}
|
||||
if(std::find(fatherNode->children.begin(), fatherNode->children.end(), this) == fatherNode->children.end()) {
|
||||
fatherNode->children.push_back(this);
|
||||
}
|
||||
this->father = fatherNode;
|
||||
}
|
||||
|
||||
const std::vector<TreeNode *> &getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
const std::vector<std::wstring> &getInfoVec() {
|
||||
return infoVec;
|
||||
}
|
||||
};
|
||||
|
||||
class SyntaxTree {
|
||||
|
||||
TreeNode *root = nullptr;
|
||||
|
||||
void do_tree_node_print(TreeNode *thisNode, std::wofstream &stream);
|
||||
public:
|
||||
|
||||
std::stack<int> tabStack;
|
||||
|
||||
const int spacesInTab = 4;
|
||||
|
||||
void setRoot(TreeNode *node) {
|
||||
this->root = node;
|
||||
}
|
||||
|
||||
void print(std::wofstream &stream);
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif //SYNTAXPARSER_SYNTAXTREE_H
|
@ -14,7 +14,7 @@ void SyntaxParser::parse() {
|
||||
auto *p_step = atg->findActionStep(status_stack.top(), tokens_queue.front());
|
||||
|
||||
if(p_step == nullptr) {
|
||||
printError();
|
||||
printError(output);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -22,15 +22,24 @@ void SyntaxParser::parse() {
|
||||
output << "MOVE IN" << "(AUTOMATA STATUS " << status_stack.top() <<"): ";
|
||||
printSymbol(tokens_queue.front());
|
||||
|
||||
auto *node = new TreeNode(tokens_queue.front());
|
||||
|
||||
auto *p_symbol = pool->getSymbol(tokens_queue.front());
|
||||
if(p_symbol->terminator) {
|
||||
node->addInfo(L"terminator");
|
||||
}
|
||||
node->addInfo(p_symbol->name);
|
||||
|
||||
status_stack.push(p_step->target.index);
|
||||
analyse_stack.push(tokens_queue.front());
|
||||
tree_stack.push(node);
|
||||
|
||||
if(_line_index > max_line_index) {
|
||||
string_buffer.str(L"");
|
||||
string_buffer.clear();
|
||||
max_line_index = lines_index[now_line++];
|
||||
}
|
||||
string_buffer << pool->getSymbol(tokens_queue.front())->name << " ";
|
||||
string_buffer << p_symbol->name << " ";
|
||||
tokens_queue.pop();
|
||||
_line_index++;
|
||||
}
|
||||
@ -41,13 +50,41 @@ void SyntaxParser::parse() {
|
||||
printProduction(p_pdt);
|
||||
output << "]";
|
||||
|
||||
std::stack<TreeNode *> temp_stack;
|
||||
|
||||
for(int i : p_pdt->right) {
|
||||
if(i == 0)
|
||||
continue;
|
||||
analyse_stack.pop();
|
||||
status_stack.pop();
|
||||
temp_stack.push(tree_stack.top());
|
||||
tree_stack.pop();
|
||||
}
|
||||
|
||||
auto *fatherNode = new TreeNode(p_pdt->left);
|
||||
|
||||
fatherNode->addInfo(pool->getSymbol(p_pdt->left)->name);
|
||||
|
||||
// std::wcout << fatherNode->getInfoVec()[0] << std::endl;
|
||||
|
||||
while(!temp_stack.empty()) {
|
||||
|
||||
// std::wcout << temp_stack.top()->getInfoVec()[0] << std::endl;
|
||||
|
||||
const auto &childInfo = temp_stack.top()->getInfoVec();
|
||||
if(childInfo[0] == L"terminator") {
|
||||
for(int i = 1; i < childInfo.size() ; i++) {
|
||||
fatherNode->addInfo(childInfo[i]);
|
||||
}
|
||||
delete temp_stack.top();
|
||||
} else {
|
||||
temp_stack.top()->setFather(fatherNode);
|
||||
}
|
||||
temp_stack.pop();
|
||||
}
|
||||
|
||||
// std::wcout << std::endl;
|
||||
|
||||
auto *p_goto_step =
|
||||
atg->findGotoStep(status_stack.top(), p_pdt->left);
|
||||
|
||||
@ -57,9 +94,12 @@ void SyntaxParser::parse() {
|
||||
}
|
||||
|
||||
analyse_stack.push(p_pdt->left);
|
||||
tree_stack.push(fatherNode);
|
||||
status_stack.push(p_goto_step->target.index);
|
||||
|
||||
} else if (p_step->action == ACC) {
|
||||
syntaxTree.setRoot(tree_stack.top());
|
||||
tree_stack.pop();
|
||||
output << "ACC";
|
||||
printDone();
|
||||
return;
|
||||
@ -148,16 +188,23 @@ void SyntaxParser::printDone() {
|
||||
output << std::endl;
|
||||
output << "------------------------------------------------------" << std::endl;
|
||||
output << "Syntax Parser Work Done, No Error Found." << std::endl << std::endl;
|
||||
|
||||
syntaxTree.print(treeOutput);
|
||||
}
|
||||
|
||||
void SyntaxParser::printError(std::wofstream &errOutput) {
|
||||
std::wstring temp_line = string_buffer.str();
|
||||
errOutput << std::endl;
|
||||
errOutput << "------------------------------------------------------" << std::endl;
|
||||
errOutput.fill('-');
|
||||
errOutput.width(24);
|
||||
errOutput << "Syntax Parser Found Error: " << std::endl
|
||||
<< "At [Line " << now_line << "]: " << temp_line
|
||||
<< "<- Next Token{" << pool->getSymbol(tokens_queue.front())->name << "}" << std::endl;
|
||||
errOutput << "AUTOMATA STATUS " << status_stack.top() << std::endl;
|
||||
}
|
||||
|
||||
void SyntaxParser::printError() {
|
||||
std::wstring temp_line = string_buffer.str();
|
||||
output << std::endl;
|
||||
output << "------------------------------------------------------" << std::endl;
|
||||
output.fill('-');
|
||||
output.width(24);
|
||||
output << "Syntax Parser Found Error: " << std::endl
|
||||
<< "At [Line " << now_line << "]: " << temp_line
|
||||
<< "<- Next Token{" << pool->getSymbol(tokens_queue.front())->name << "}" << std::endl;
|
||||
output << "AUTOMATA STATUS " << status_stack.top() << std::endl;
|
||||
printError(output);
|
||||
printError(treeOutput);
|
||||
}
|
||||
|
52
src/SyntaxTree.cpp
Normal file
52
src/SyntaxTree.cpp
Normal file
@ -0,0 +1,52 @@
|
||||
//
|
||||
// Created by Administrator on 2021/5/12.
|
||||
//
|
||||
|
||||
#include "SyntaxTree.h"
|
||||
|
||||
void SyntaxTree::do_tree_node_print(TreeNode *thisNode, std::wofstream &stream) {
|
||||
|
||||
tabStack.push(tabStack.top() + 1);
|
||||
|
||||
for(int i = tabStack.top() * spacesInTab; i > 0; i--) {
|
||||
if(i % spacesInTab == 0) {
|
||||
stream << L'|';
|
||||
}
|
||||
stream << L' ';
|
||||
}
|
||||
|
||||
|
||||
int count = 0;
|
||||
for(auto &info : thisNode->getInfoVec()) {
|
||||
if(count++ != 0) {
|
||||
if(count != 2) {
|
||||
stream << L", ";
|
||||
}
|
||||
stream << info;
|
||||
} else {
|
||||
stream << info << L'<';
|
||||
}
|
||||
}
|
||||
|
||||
stream << L'>';
|
||||
|
||||
stream << L'\n';
|
||||
|
||||
if(!thisNode->getChildren().empty()) {
|
||||
for (auto &node : thisNode->getChildren()) {
|
||||
do_tree_node_print(node, stream);
|
||||
}
|
||||
}
|
||||
|
||||
tabStack.pop();
|
||||
}
|
||||
|
||||
void SyntaxTree::print(std::wofstream &stream) {
|
||||
|
||||
if(this->root == nullptr) return;
|
||||
|
||||
tabStack.push(-1);
|
||||
|
||||
do_tree_node_print(root, stream);
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user