From 65f012d15513814bd2cc4ad74f54edd35ade13fe Mon Sep 17 00:00:00 2001 From: bringert Date: Mon, 23 Aug 2004 07:51:36 +0000 Subject: Added CFGM format (pm -printer=cfgm) and utf8 conversion for pm. --- src/GF/CFGM/CFG.cf | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/GF/CFGM/CFG.cf (limited to 'src/GF/CFGM/CFG.cf') 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 ""; + + -- cgit v1.2.3