******************************** * BNF Specification for cflat * ******************************** The cflat lexicon is defined in phaseI. Cflat syntax is defined here. Cflat differs from C in these ways: o return statements are required in functions o if-else constructs must be enclosed in {} o declaration statements are illegal inside blocks NOTATION. ,---------------------------------------------------------------------, | o e denotes epsilon | | o | is a metacharacter that denotes or | | o ::= is the production operator | | o non-terminals are enclosed in angle brackets | | o all other literal chars or strings are terminals; e.g., | | | | Lexeme TokenID | | , COMMA | | ) RPAREN | | ( LPAREN | | { LCURLY | | } RCURLY | | if KEYWORD | | int KEYWORD | | and so on... | `---------------------------------------------------------------------' NOTE : THIS BNF IS A SUGGESTION - YOU CAN MAKE YOUR OWN. NOTE: Bison cannot accept '-' dashes in nonterminals ::= ::= () { return ;} ::= , | | e ::= ::= | e ::= {} ::= | | e ::= | while | if else | ; ::= ; | = ; ::= int | float | char ::= = ; ::= | ::= * | ::= () | | ::= () | () ::= ::= == | < | > | <= | >= ::= + | - ::= FLOAT | INTEGER