diff options
| author | aarne <aarne@cs.chalmers.se> | 2006-09-05 12:14:13 +0000 |
|---|---|---|
| committer | aarne <aarne@cs.chalmers.se> | 2006-09-05 12:14:13 +0000 |
| commit | 8484cfab1b1d27ba7046798c2821c138e4f5fabf (patch) | |
| tree | b1b6e5660b736b190cd5b9bcf7aa59e1cb798a5f /src/GF/Canon/GFCC/GFCC.cf | |
| parent | 1807dc437960afd13adc17cce52c54992daa9570 (diff) | |
starting GFCC format
Diffstat (limited to 'src/GF/Canon/GFCC/GFCC.cf')
| -rw-r--r-- | src/GF/Canon/GFCC/GFCC.cf | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/GF/Canon/GFCC/GFCC.cf b/src/GF/Canon/GFCC/GFCC.cf new file mode 100644 index 000000000..eb3bff56c --- /dev/null +++ b/src/GF/Canon/GFCC/GFCC.cf @@ -0,0 +1,42 @@ +Grm. Grammar ::= Header ";" Abstract ";" [Concrete] ";" ; + +Hdr. Header ::= "grammar" CId "(" [CId] ")" ; + +Abs. Abstract ::= "abstract" "{" [AbsDef] "}" ";" ; + +Cnc. Concrete ::= "concrete" CId "{" [CncDef] "}" ; + +Fun. AbsDef ::= CId ":" Type "=" Exp ; +Lin. CncDef ::= CId "=" Term ; + +Typ. Type ::= [CId] "->" CId ; +Tr. Exp ::= "(" Atom [Exp] ")" ; +AC. Atom ::= CId ; +AS. Atom ::= String ; +AI. Atom ::= Integer ; + +R. Term ::= "[" [Term] "]" ; -- record/table +P. Term ::= Term "[" Term "]" ; -- projection/selection +S. Term ::= "(" [Term] ")" ; -- sequence with ++ +K. Term ::= Tokn ; -- token +V. Term ::= "$" Integer ; -- argument +C. Term ::= Integer ; -- parameter value/label +F. Term ::= CId ; -- global constant +FV. Term ::= "[|" [Term] "|]" ; -- free variation +W. Term ::= "(" String "+" Term ")" ; -- prefix + suffix table + +KS. Tokn ::= String ; +KP. Tokn ::= "[" "pre" [String] "[" [Variant] "]" "]" ; +Var. Variant ::= [String] "/" [String] ; + + +terminator Concrete ";" ; +terminator AbsDef ";" ; +terminator CncDef ";" ; +terminator CId "" ; +separator Term "," ; +terminator Exp "" ; +terminator String "" ; +separator Variant "," ; + +token CId (('_' | letter) (letter | digit | '\'' | '_')*) ; |
