source: applications/trunk/LFC/lfcg.ag

Last change on this file was 3809, checked in by orlov, 12 years ago
  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1
2Nullable nonterminals:
3
4  (grammar | grammar_rest | item_rest | terms_rest)
5
6
7The starters of nonterminals:
8
9grammar ->
10  (LANG | LBRACKET)
11grammar_rest ->
12  (BLANK)
13production ->
14  (LANG | LBRACKET)
15ordinary_production ->
16  (LANG)
17non_token_production ->
18  (LBRACKET)
19terms ->
20  (LANG | STRING | TILDA)
21terms_rest ->
22  (VBAR)
23term ->
24  (LANG | STRING | TILDA)
25item_rest ->
26  (LANG | STRING | TILDA)
27item ->
28  (LANG | STRING | TILDA)
29
30
31The followers of nullable nonterminals:
32
33grammar ->
34  ($END)
35grammar_rest ->
36  ($END)
37terms_rest ->
38  ($END | BLANK)
39item_rest ->
40  ($END | BLANK | VBAR)
41
42
43*** Annotated grammar ***
44
45#grammar
46: ($END)
47     /* empty */
48| (LANG | LBRACKET)
49     production #grammar_rest
50;
51
52#grammar_rest
53: ($END)
54     /* empty */
55| (BLANK)
56     BLANK #grammar
57;
58
59production
60: (LANG)
61     ordinary_production
62| (LBRACKET)
63     non_token_production
64;
65
66ordinary_production
67: (LANG)
68     LANG IDENTIFIER RANG TO terms
69;
70
71non_token_production
72: (LBRACKET)
73     LBRACKET IDENTIFIER RBRACKET TO terms
74;
75
76terms
77: (LANG | STRING | TILDA)
78     term #terms_rest
79;
80
81#terms_rest
82: ($END | BLANK)
83     /* empty */
84| (VBAR)
85     VBAR terms
86;
87
88term
89: (LANG | STRING | TILDA)
90     item #item_rest
91;
92
93#item_rest
94: ($END | BLANK | VBAR)
95     /* empty */
96| (LANG | STRING | TILDA)
97     term
98;
99
100item
101: (TILDA)
102     TILDA
103| (LANG)
104     LANG IDENTIFIER RANG
105| (STRING)
106     STRING
107;
108
Note: See TracBrowser for help on using the repository browser.