summaryrefslogtreecommitdiff
path: root/src/GF/CFGM/CFG.cf
blob: 51117b8ba498238347682766cb53abdc054010db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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 "";