summaryrefslogtreecommitdiff
path: root/src/GF/CFGM/CFG.cf
diff options
context:
space:
mode:
authorbringert <unknown>2004-08-23 07:51:36 +0000
committerbringert <unknown>2004-08-23 07:51:36 +0000
commit65f012d15513814bd2cc4ad74f54edd35ade13fe (patch)
tree089419071773038e8357a6b97a9ec0481df2a338 /src/GF/CFGM/CFG.cf
parent25ffe15333a881022047409a1c12a17dd41d1198 (diff)
Added CFGM format (pm -printer=cfgm) and utf8 conversion for pm.
Diffstat (limited to 'src/GF/CFGM/CFG.cf')
-rw-r--r--src/GF/CFGM/CFG.cf35
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 "";
+
+