Now that bug is fixed that prevented tokens from working properly when used anonymously and as named rules
41 lines
832 B
Text
41 lines
832 B
Text
==========================================
|
|
simple declarations
|
|
==========================================
|
|
|
|
int x;
|
|
|
|
---
|
|
|
|
(declaration (identifier) (identifier))
|
|
|
|
==========================================
|
|
simple functions
|
|
==========================================
|
|
|
|
int main() {
|
|
}
|
|
|
|
---
|
|
|
|
(function_definition
|
|
(identifier) (direct_declarator (identifier))
|
|
(compound_statement))
|
|
|
|
==========================================
|
|
ambiguous declarations
|
|
==========================================
|
|
|
|
int main() {
|
|
int i;
|
|
someTypeOrValue * pointerOrMultiplicand();
|
|
float y;
|
|
}
|
|
|
|
---
|
|
|
|
(function_definition
|
|
(identifier) (direct_declarator (identifier))
|
|
(compound_statement
|
|
(declaration (identifier) (identifier))
|
|
(declaration (identifier) (declarator (pointer) (direct_declarator (identifier))))
|
|
(declaration (identifier) (identifier))))
|