Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- FunctionsAndDeclarations: FunctionDefinition {;}
- | FunctionDefinition Expr2 {;}
- | FunctionDeclaration {;}
- | FunctionDeclaration Expr2 {;}
- | Declaration {;}
- | Declaration Expr2 {;}
- ;
- Expr2: FunctionDefinition {;}
- | FunctionDeclaration {;}
- | FunctionDefinition Expr2 {;}
- | FunctionDeclaration Expr2 {;}
- | Declaration {;}
- | Declaration Expr2 {;}
- ;
- FunctionDefinition: TypeSpec FunctionDeclarator FunctionBody {;}
- ;
- FunctionBody: LBRACE DeclarationsAndStatements RBRACE {;}
- | LBRACE RBRACE {;}
- ;
- DeclarationsAndStatements: Statement {;}
- | Statement DeclarationsAndStatements {;}
- | Declaration {;}
- | Declaration DeclarationsAndStatements {;}
- ;
- FunctionDeclaration:TypeSpec FunctionDeclarator SEMI {;}
- ;
- FunctionDeclarator: ID LPAR ParameterList RPAR {;}
- ;
- ParameterList: ParameterDeclaration {;}
- | ParameterDeclaration COMMA ParameterList {;}
- ;
- ParameterDeclaration: TypeSpec ID {;}
- | TypeSpec {;}
- ;
- Declaration: TypeSpec Declarator SEMI {;}
- | TypeSpec Declarator Expr3 SEMI {;}
- ;
- Expr3: COMMA Declarator Declaration {;}
- ;
- TypeSpec: CHAR {;}
- | INT {;}
- | VOID {;}
- | SHORT {;}
- | DOUBLE {;}
- ;
- Declarator: ID {;}
- | ID ASSIGN Expr {;}
- ;
- Statement: Expr SEMI {;}
- | SEMI {;}
- | LBRACE Statement RBRACE {;}
- | IF LPAR Expr RPAR Statement ELSE Statement {;}
- | IF LPAR Expr RPAR Statement {;}
- | WHILE LPAR Expr RPAR Statement {;}
- | RETURN Expr SEMI {;}
- | RETURN SEMI {;}
- ;
- Expr: Expr ASSIGN Expr {;}
- | Expr COMMA Expr {;}
- | Expr PLUS Expr {;}
- | Expr MINUS Expr {;}
- | Expr MUL Expr {;}
- | Expr DIV Expr {;}
- | Expr MOD Expr {;}
- | Expr OR Expr {;}
- | Expr AND Expr {;}
- | Expr BITWISEAND Expr {;}
- | Expr BITWISEOR Expr {;}
- | Expr BITWISEXOR Expr {;}
- | Expr EQ Expr {;}
- | Expr NE Expr {;}
- | Expr LE Expr {;}
- | Expr GE Expr {;}
- | Expr LT Expr {;}
- | Expr GT Expr {;}
- | PLUS Expr {;}
- | MINUS Expr {;}
- | NOT Expr {;}
- | ID LPAR RPAR {;}
- | ID LPAR Expr RPAR {;}
- | INTLIT {;}
- | CHRLIT {;}
- | REALLIT {;}
- ;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement