#FILE : grammar.cfg
- Comments: ..1. Single Line Comments : ?? ..2. Multi Line Comments : /* */
identifier
constant
string literal
primary-expression
postfix-expression [expression]
postfix-expression ( )
postfix-expression ( argument-expression-list)
postfix-expression . identifier
postfix-expression -> identifier
postfix-expression pp (pp == ++)
postfix-expression mm (mm == --)
assignment-expression
argument-expression-list , assignment-expression
postfix-expression
pp unary-expression
mm unary-expression
unary-operator cast-expression
SO unary-expression (SO == sizeof)
SO ( type-name )
&
mul ( mul == *)
add ( add == +)
sub ( sub == -)
~
not ( not == !)
unary-expression
( type-name ) cast-expression
cast-expression
multiplicative-expression mul cast-expression
multiplicative-expression div cast-expression
multiplicative-expression mod cast-expression
multiplicative-expression
additive-expression add multiplicative-expression
additive-expression sub multiplicative-expression
additive-expression
shift-expression << additive-expression
shift-expression >> additive-expression
shift-expression
relational-expression lt shift-expression (lt == <)
relational-expression gt shift-expression (gt == >)
relational-expression lte shift-expression (lte == <=)
relational-expression gte shift-expression (gte == >=)
relational-expression
equality-expression eqeq relational-expression (eqeq == "==")
equality-expression neq relational-expression (neq == "!=")
equality-expression
AND-expression & equality-expression
AND-expression
exclusive-OR-expression ^ AND-expression
exclusive-OR-expression
inclusive-OR-expression | exclusive-OR-expression
inclusive-OR-expression
logical-AND-expression && inclusive-OR-expression
logical-AND-expression
logical-OR-expression || logical-AND-expression
logical-OR-expression
logical-OR-expression ? expression : conditional-expression
conditional-expression
unary-expression assignment-operator assignment-expression
eq (eq == "=")
/* PLEASE DO THIS LATER */
assignment-expression
expression , assignment-expression
conditional-expression
declaration-specifiers
declaration-specifiers init-declarator-list
storage-class-specifier
type-specifier
type-qualifier
storage-class-specifier declaration-specifiers
type-specifier declaration-specifiers
type-qualifier declaration-specifiers
init-declarator
init-declarator-list , init-declarator
declarator
declarator eq initializer
typedef
extern
static
auto
register
void
char
short
int
long
float
double
signed
unsigned
struct-or-union-specifier
enum-specifier
typedef-name
struct-or-union { struct-declaration-list }
struct-or-union identifier { struct-declaration-list }
struct-or-union identifier
struct
union
struct-declaration
struct-declaration-list struct-declaration
specifier-qualifier-list struct-declarator-list
type-specifier
type-qualifier
type-specifier specifier-qualifier-list
type-qualifier specifier-qualifier-list
struct-declarator
struct-declarator-list , struct-declarator
declarator
constant-expression
declarator constant-expression
enum { enumerator-list }
enum identifier { enumerator-list }
enum identifier
enumerator
enumerator-list , enumerator
enumeration-constant
enumeration-constant eq constant-expression