-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfirst_follow_productions.txt
79 lines (78 loc) · 2.22 KB
/
first_follow_productions.txt
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Program -> Declaration_list $
Declaration_list -> Declaration Declaration_list
Declaration_list -> EPSILON
Declaration -> Declaration_initial Declaration_prime
Declaration_initial -> Type_specifier ID
Declaration_prime -> Fun_declaration_prime
Declaration_prime -> Var_declaration_prime
Var_declaration_prime -> ;
Var_declaration_prime -> [ NUM ] ;
Fun_declaration_prime -> ( Params ) Compound_stmt
Type_specifier -> int
Type_specifier -> void
Params -> int ID Param_prime Param_list
Params -> void
Param_list -> , Param Param_list
Param_list -> EPSILON
Param -> Declaration_initial Param_prime
Param_prime -> [ ]
Param_prime -> EPSILON
Compound_stmt -> { Declaration_list Statement_list }
Statement_list -> Statement Statement_list
Statement_list -> EPSILON
Statement -> Expression_stmt
Statement -> Compound_stmt
Statement -> Selection_stmt
Statement -> Iteration_stmt
Statement -> Return_stmt
Expression_stmt -> Expression ;
Expression_stmt -> break ;
Expression_stmt -> ;
Selection_stmt -> if ( Expression ) Statement Else_stmt
Else_stmt -> endif
Else_stmt -> else Statement endif
Iteration_stmt -> repeat Statement until ( Expression )
Return_stmt -> return Return_stmt_prime
Return_stmt_prime -> ;
Return_stmt_prime -> Expression ;
Expression -> Simple_expression_zegond
Expression -> ID B
B -> = Expression
B -> [ Expression ] H
B -> Simple_expression_prime
H -> = Expression
H -> G D C
Simple_expression_zegond -> Additive_expression_zegond C
Simple_expression_prime -> Additive_expression_prime C
C -> Relop Additive_expression
C -> EPSILON
Relop -> <
Relop -> ==
Additive_expression -> Term D
Additive_expression_prime -> Term_prime D
Additive_expression_zegond -> Term_zegond D
D -> Addop Term D
D -> EPSILON
Addop -> +
Addop -> _
Term -> Factor G
Term_prime -> Factor_prime G
Term_zegond -> Factor_zegond G
G -> * Factor G
G -> EPSILON
Factor -> ( Expression )
Factor -> ID Var_call_prime
Factor -> NUM
Var_call_prime -> ( Args )
Var_call_prime -> Var_prime
Var_prime -> [ Expression ]
Var_prime -> EPSILON
Factor_prime -> ( Args )
Factor_prime -> EPSILON
Factor_zegond -> ( Expression )
Factor_zegond -> NUM
Args -> Arg_list
Args -> EPSILON
Arg_list -> Expression Arg_list_prime
Arg_list_prime -> , Expression Arg_list_prime
Arg_list_prime -> EPSILON