by Frans Faase
IParse c.gr scan.pc -p
IParse js.gr my.js
root : nt_def SEQ eof. nt_def : ident ":" or_rule "." [nt_def]. or_rule : rule CHAIN "|". rule : opt_elem SEQ OPT ( "[" ident "]" ) OPT [rule] . opt_elem : list_elem "OPT" [opt] | list_elem . list_elem : prim_elem "SEQ" [seq] | prim_elem "LIST" [list] | prim_elem "CHAIN" string [chain] | prim_elem . prim_elem : string | ident | "ident" ">+" ident [identdefadd] | "ident" ">" ident [identdef] | "ident" "<" ident [identuse] | "ident" "!" ident [identfield] | "ident" [identalone] | "{" [opencontext] | "}" [closecontext] | "(" or_rule ")". |