1
0
forked from GitHub/gf-core

GF/src is now for 2.9, and the new sources are in src-3.0 - keep it this way until the release of GF 3

This commit is contained in:
aarne
2008-05-21 09:26:44 +00:00
parent 915a1de717
commit 055c0d0d5a
536 changed files with 0 additions and 0 deletions

36
src-3.0/GF/CFGM/CFG.cf Normal file
View File

@@ -0,0 +1,36 @@
entrypoints Grammars;
Grammars. Grammars ::= [Grammar];
Grammar. Grammar ::= "grammar" Ident [Flag] [Rule] "end" "grammar";
separator Grammar "";
StartCat. Flag ::= "startcat" Category;
terminator Flag ";";
Rule. Rule ::= Fun ":" Profiles "." Category "->" [Symbol];
terminator Rule ";";
Cons. Fun ::= Ident ;
Coerce. Fun ::= "_" ;
Profiles. Profiles ::= "[" [Profile] "]";
separator Profile ",";
UnifyProfile. Profile ::= "[" [Integer] "]";
ConstProfile. Profile ::= Ident ;
separator Integer ",";
CatS. Symbol ::= Category;
TermS. Symbol ::= String;
-- separator Symbol "";
[]. [Symbol] ::= "." ;
(:[]). [Symbol] ::= Symbol ;
(:). [Symbol] ::= Symbol [Symbol] ;
Category. Category ::= SingleQuoteString ;
token SingleQuoteString '\'' ((char - ["'\\"]) | ('\\' ["'\\"]))* '\'' ;