summaryrefslogtreecommitdiff
path: root/src/GF/Canon/GFC.cf
diff options
context:
space:
mode:
Diffstat (limited to 'src/GF/Canon/GFC.cf')
-rw-r--r--src/GF/Canon/GFC.cf12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/GF/Canon/GFC.cf b/src/GF/Canon/GFC.cf
index 7d258b38e..8c2490b64 100644
--- a/src/GF/Canon/GFC.cf
+++ b/src/GF/Canon/GFC.cf
@@ -2,11 +2,21 @@
-- Canonical GF. AR 27/4/2003
-entrypoints Canon ;
+entrypoints Canon, Line ;
+
+-- old approach: read in a whole grammar
MGr. Canon ::= "grammar" [Ident] "of" Ident ";" [Module] ;
Gr. Canon ::= [Module] ;
+-- new approach: read line by line
+
+LMulti. Line ::= "grammar" [Ident] "of" Ident ";" ;
+LHeader. Line ::= ModType "=" Extend Open "{" ;
+LFlag. Line ::= Flag ";" ;
+LDef. Line ::= Def ";" ;
+LEnd. Line ::= "}" ;
+
Mod. Module ::= ModType "=" Extend Open "{" [Flag] [Def] "}" ;
MTAbs. ModType ::= "abstract" Ident ;