Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
46 lines (33 sloc) 682 Bytes
@symbols = '!=' '<=' '>=';
@start = expr;
expr = orExpr;
orExpr = andExpr orTerm*;
orTerm = or andExpr;
andExpr = relExpr andTerm*;
andTerm = and relExpr;
relExpr = callExpr (relOp callExpr)*;
relOp = lt | gt | eq | ne | le | ge;
callExpr = primary (openParen argList? closeParen)?;
argList = atom (comma atom)*;
primary = atom | openParen expr closeParen;
atom = obj | literal;
obj = id member*;
id = Word;
member = dot id;
literal = QuotedString | Number | bool;
bool = yes | no;
// TOKENS
lt = '<';
gt = '>';
eq = '=';
ne = '!=';
le = '<=';
ge = '>=';
openParen = '(';
closeParen = ')'!;
yes = 'yes';
no = 'no';
dot = '.';
comma = ',';
or = 'or';
and = 'and';
Something went wrong with that request. Please try again.