diff options
Diffstat (limited to 'src/GF/CFGM/CFG.cf')
| -rw-r--r-- | src/GF/CFGM/CFG.cf | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/src/GF/CFGM/CFG.cf b/src/GF/CFGM/CFG.cf new file mode 100644 index 000000000..51117b8ba --- /dev/null +++ b/src/GF/CFGM/CFG.cf @@ -0,0 +1,35 @@ +entrypoints Grammars; + +Grammars. Grammars ::= [Grammar]; + +Grammar. Grammar ::= "grammar" Ident [Flag] [Rule] "end" "grammar"; +separator Grammar ""; + +StartCat. Flag ::= "startcat" Category; +terminator Flag ";"; + +Rule. Rule ::= Ident ":" Name Profile "." Category "->" [Symbol]; +terminator Rule ";"; + +Profile. Profile ::= "[" [Ints] "]"; + +Ints. Ints ::= "[" [Integer] "]"; +separator Ints ","; +separator Integer ","; + +CatS. Symbol ::= Category; +TermS. Symbol ::= String; + +separator Symbol ""; + +Name. Name ::= [IdentParam] Category; +terminator IdentParam "/"; + +Category. Category ::= IdentParam "." Ident [Param] ; + +IdentParam. IdentParam ::= Ident "{" [Param] "}" ; + +Param. Param ::= "!" Ident ; +separator Param ""; + + |
