blob: db3053c0731eb03308f841c945368e39cd6b6394 [file] [log] [blame]
grammar cdsResults;
/*
* Parser Rules
*/
cds_results : rule_res* EOF ;
rule_res : (rulename annotate_res | '"' resolution '"' grid) NL ;
rulename : '"' RULENAME '"' ;
annotate_res : '(' annotate+ ')' ;
annotate : '(' bbox '"' result '"' ')' ;
bbox : '(' '(' lx ly ')' '(' ux uy ')' ')' ;
lx : NUMBER ;
ly : NUMBER ;
ux : NUMBER ;
uy : NUMBER ;
result : 'PASS' | 'FAIL' ;
resolution : '_RESOLUTION' ;
grid : NUMBER ;
/*
* Lexer Rules
*/
RULENAME : [A-Za-z] ~[ \t\n\r"]* ;
NUMBER : '-'? [0-9]+ ('.' [0-9]+)? ;
WS : (' ' | '\t')+ -> skip ;
NL : ('\r'? '\n' | '\r')+ ;