mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-08 02:32:50 -06:00
experiment with gfc input
This commit is contained in:
@@ -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 ;
|
||||
|
||||
Reference in New Issue
Block a user