1
0
forked from GitHub/gf-core

Added CFGM format (pm -printer=cfgm) and utf8 conversion for pm.

This commit is contained in:
bringert
2004-08-23 07:51:36 +00:00
parent 25ffe15333
commit 65f012d155
22 changed files with 1829 additions and 20 deletions

35
src/GF/CFGM/CFG.cf Normal file
View File

@@ -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 "";