source: devel-tools/trunk/LL1GrammarAnalyzers/LL1Grammars/Rf5LLGr.f @ 4114

Last change on this file since 4114 was 4114, checked in by yura, 11 years ago
File size: 2.3 KB
Line 
1
2Nullable nonterminals:
3
4  (exp | extern_defs | maybe_sc | program | sc_sentences | 
5  sentences)
6
7
8The starters of nonterminals:
9
10program ->
11  (ENTRY | EXTERN | WORD)
12maybe_sc ->
13  (SC)
14extern_defs ->
15  (WORD)
16func_def ->
17  (ENTRY | WORD)
18block ->
19  (LCURL)
20sentences ->
21  (CHAR | COMMA | EQ | LANGU | LPAR | 
22  NUM | REALNUM | VAR | WORD)
23sc_sentences ->
24  (SC)
25sentence ->
26  (CHAR | COMMA | EQ | LANGU | LPAR | 
27  NUM | REALNUM | VAR | WORD)
28conditions ->
29  (COMMA | EQ)
30conditions2 ->
31  (CHAR | COMMA | EQ | LANGU | LCURL | 
32  LPAR | NUM | REALNUM | VAR | WORD)
33exp ->
34  (CHAR | LANGU | LPAR | NUM | REALNUM | 
35  VAR | WORD)
36exp_head ->
37  (CHAR | LANGU | LPAR | NUM | REALNUM | 
38  VAR | WORD)
39static_symbol ->
40  (CHAR | NUM | REALNUM | WORD)
41name ->
42  (WORD)
43
44
45The followers of nullable nonterminals:
46
47program ->
48  ($END)
49maybe_sc ->
50  ($END | ENTRY | EXTERN | WORD)
51extern_defs ->
52  (SC)
53sentences ->
54  (RCURL)
55sc_sentences ->
56  (RCURL)
57exp ->
58  (COL | COMMA | EQ | RANGU | RCURL | 
59  RPAR | SC)
60
61
62*** Annotated grammar ***
63
64#program
65: ($END)
66     /* empty */
67| (EXTERN)
68     EXTERN #extern_defs SC #program 
69| (ENTRY | WORD)
70     func_def #maybe_sc #program 
71;
72
73#maybe_sc
74: ($END | ENTRY | EXTERN | WORD)
75     /* empty */
76| (SC)
77     SC
78;
79
80#extern_defs
81: (WORD)
82     name COMMA #extern_defs
83| (SC)
84     /* empty */
85;
86
87func_def
88: (WORD)
89     name block 
90| (ENTRY)
91     ENTRY name block 
92;
93
94block
95: (LCURL)
96     LCURL #sentences RCURL
97;
98
99#sentences
100: (RCURL)
101     /* empty */
102| (CHAR | COMMA | EQ | LANGU | LPAR | 
103  NUM | REALNUM | VAR | WORD)
104     sentence #sc_sentences
105;
106
107#sc_sentences
108: (RCURL)
109     /* empty */
110| (SC)
111     SC #sentences
112;
113
114sentence
115: (CHAR | COMMA | EQ | LANGU | LPAR | 
116  NUM | REALNUM | VAR | WORD)
117     #exp conditions
118;
119
120conditions
121: (COMMA)
122     COMMA #exp COL conditions2
123| (EQ)
124     EQ #exp 
125;
126
127conditions2
128: (CHAR | COMMA | EQ | LANGU | LPAR | 
129  NUM | REALNUM | VAR | WORD)
130     #exp conditions
131| (LCURL)
132     block 
133;
134
135#exp
136: (COL | COMMA | EQ | RANGU | RCURL | 
137  RPAR | SC)
138     /* empty */
139| (CHAR | LANGU | LPAR | NUM | REALNUM | 
140  VAR | WORD)
141     exp_head #exp 
142;
143
144exp_head
145: (CHAR | NUM | REALNUM | WORD)
146     static_symbol
147| (LPAR)
148     LPAR #exp RPAR
149| (VAR)
150     VAR
151| (LANGU)
152     LANGU name #exp RANGU
153;
154
155static_symbol
156: (CHAR)
157     CHAR 
158| (WORD)
159     WORD
160| (NUM)
161     NUM
162| (REALNUM)
163     REALNUM
164;
165
166name
167: (WORD)
168     WORD
169;
170
Note: See TracBrowser for help on using the repository browser.