Looking for people using CocoR I found this project and I've done a experimental tool to convert CocoR grammars to a kind of EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams see bellow the converted and with some hand made changes of OST.atg to allow view it at https://www.bottlecaps.de/rr/ui the order of the rules could be changed to a better view of the railroad diagrams. Copy and paste the EBNF bellow on https://www.bottlecaps.de/rr/ui tab Edit Grammar then switch to the tab View Diagram.
//"/*" "*/" "//" eol '\t' '+' '\r' '+' '\n'
OST ::= SYNC "OST" ( MAXSPEEDS )? ( GRADES )? ( FEATURES )? ( TYPES )? "END"
MAXSPEEDS ::= SYNC "MAX" "SPEEDS" MAXSPEED ( MAXSPEED )*
MAXSPEED ::= SYNC "SPEED" STRING "=" UINT ( "km/h" )?
GRADES ::= SYNC "GRADES" GRADE ( GRADE )*
GRADE ::= SYNC "SURFACE" "GRADE" UINT "{" ( STRING )* "}"
FEATURES ::= SYNC "FEATURES" FEATURE ( FEATURE )*
FEATURE ::= SYNC "FEATURE" IDENT ( FEATUREDESCS )?
FEATUREDESCS ::= "DESC" IDENT ":" STRING ( IDENT ":" STRING )*
TYPES ::= SYNC "TYPES" TYPE ( TYPE )*
TYPE ::= SYNC "TYPE" IDENT ( "IGNORE" )? "=" TYPEKINDS "(" TAGCONDITION ")" ( "OR" TYPEKINDS "(" TAGCONDITION ")" )* ( "{" ( TYPEFEATURE ( "," TYPEFEATURE )* )? "}" )? ( SPECIALTYPE )? ( TYPEOPTIONS )? ( GROUPS )? ( TYPEDESCS )?
TAGCONDITION ::= TAGANDCOND ( "OR" TAGANDCOND )*
TAGANDCOND ::= TAGBOOLCOND ( "AND" TAGBOOLCOND )*
TAGBOOLCOND ::= TAGBINCOND | TAGEXISTSCOND | "(" TAGCONDITION ")" | "!" TAGBOOLCOND
TAGBINCOND ::= string ( TAGLESSCOND | TAGLESSEQUALCOND | TAGEQUALSCOND | TAGNOTEQUALSCOND | TAGGREATERCOND | TAGGREATEREQUALCOND | TAGISINCOND )
TAGLESSCOND ::= "<" ( STRING | UINT )
TAGLESSEQUALCOND ::= "<=" ( STRING | UINT )
TAGEQUALSCOND ::= "==" ( STRING | UINT )
TAGNOTEQUALSCOND ::= "!=" ( STRING | UINT )
TAGGREATEREQUALCOND ::= ">=" ( STRING | UINT )
TAGGREATERCOND ::= ">" ( STRING | UINT )
TAGISINCOND ::= "IN" "[" string ( "," string )* "]"
TAGEXISTSCOND ::= "EXISTS" string
TYPEKINDS ::= TYPEKIND ( ( "," )? TYPEKIND )*
TYPEKIND ::= "NODE" | "WAY" | "AREA" | "RELATION"
TYPEFEATURE ::= IDENT
SPECIALTYPE ::= "MULTIPOLYGON" | "ROUTE_MASTER" | "ROUTE"
TYPEOPTIONS ::= TYPEOPTION ( TYPEOPTION )*
TYPEOPTION ::= PATH | "LOCATION" | "ADMIN_REGION" | "ADDRESS" | "POI" | "OPTIMIZE_LOW_ZOOM" | "PIN_WAY" | "MERGE_AREAS" | "IGNORESEALAND" | LANES
PATH ::= "PATH" ( "[" ( "FOOT" )? ( "BICYCLE" )? ( "CAR" )? "]" )?
LANES ::= "LANES" "[" UINT8 UINT8 "]"
GROUPS ::= "GROUP" IDENT ( "," IDENT )*
TYPEDESCS ::= "DESC" IDENT ":" STRING ( IDENT ":" STRING )*
IDENT ::= ident
STRING ::= string
UINT ::= number
UINT8 ::= number
letter ::= 'a' .. 'z' '+' 'A' .. 'Z'
digit ::= '0' .. '9'
eol ::= '\n'
stringchar ::= ANY '-' '"'
quotchar ::= ANY
ident ::= letter ( letter | digit | '_' )*
number ::= digit ( digit )*
string ::= '"' ( stringchar | '\' quotchar )* '"'
Looking for people using CocoR I found this project and I've done a experimental tool to convert CocoR grammars to a kind of EBNF understood by https://www.bottlecaps.de/rr/ui to generate railroad diagrams see bellow the converted and with some hand made changes of
OST.atgto allow view it at https://www.bottlecaps.de/rr/ui the order of the rules could be changed to a better view of the railroad diagrams. Copy and paste the EBNF bellow on https://www.bottlecaps.de/rr/ui tab Edit Grammar then switch to the tab View Diagram.Cheers !