-
Notifications
You must be signed in to change notification settings - Fork 35
EBNF rules grammar
Olivier Duhart edited this page Nov 10, 2018
·
5 revisions
IDENTIFIER : an id is a sequence of letters
COLON : ":"
ZEROORMORE : "*"
ONEORMORE : "+"
OPTION : "?"
DISCARD : "[d]"
LPAREN :"("
RPAREN : ")";
rule : IDENTIFIER COLON clauses
clauses : clause clauses
clauses : clause
# clause
clause : IDENTIFIER ZEROORMORE
clause : IDENTIFIER ONEORMORE
clause : IDENTIFIER OPTION
clause : IDENTIFIER DISCARD
clause : IDENTIFIER
# group
clause : LPAREN groupclauses RPAREN
clause : LPAREN groupclauses RPAREN ONEORMORE
clause : LPAREN groupclauses RPAREN ZEROORMORE
clause : LPAREN groupclauses RPAREN OPTION
groupclauses : groupclause groupclauses
groupclauses : groupclause
groupclause : IDENTIFIER
groupclause : IDENTIFIER DISCARD