gdritter repos datalog / 9490873
A basic parser and some tests Getty Ritter 7 years ago
8 changed file(s) with 5135 addition(s) and 0 deletion(s). Collapse all Expand all
1 target/
2 **/*.rs.bk
3 Cargo.lock
4 *~
1 [package]
2 name = "datalog"
3 version = "0.1.0"
4 authors = ["Getty Ritter <gdritter@galois.com>"]
5 build = "build.rs"
6
7 [dependencies.regex]
8 version = "0.2.0"
9
10 # Add a dependency on the LALRPOP runtime library:
11 [dependencies.lalrpop-util]
12 version = "0.13.1"
13
14 [build-dependencies.lalrpop]
15 version = "0.13.1"
1 extern crate lalrpop;
2
3 fn main() {
4 lalrpop::process_root().unwrap();
5 }
1 This is a slightly different Datalog variant implemented as an
2 efficient, FFI-friendly Rust library. The major deviation from
3 standard Datalog is the existence of a simple type system for rows as
4 well as a choice of tuple- or record-structured data.
5
6 Typical datalog facts are tuple-structured:
7
8 ```
9 table parent(atom, atom).
10 ```
11
12 Facts are inserted into the database by stating them.
13
14 ```
15 parent(terry, austin).
16 ```
17
18 Queries against this are done in the typical Datalog way:
19
20 ```
21 ancestor(X, Y) :- parent(X, Y).
22 ancestor(X, Y) :- ancestor(X, Z), parent(Z, Y).
23 ```
24
25 However, for utility, you can also express this in a record-structured
26 way with field names. Predicates/queries can also use record
27 structures, which act as keyword arguments.
28
29 ```
30 table parent { parent : atom, child : atom }.
31 parent { parent: terry, child: austin }.
32 ancestor { parent: X, child: Y }
33 :- parent { parent: X, child: Y }.
34 ancestor { parent: X, child: Y }
35 :- ancestor { parent: X, child: Z }, parent { parent: X, child: Y }.
36 ```
1 #[derive(Debug,PartialEq,Eq)]
2 pub enum TopLevel {
3 TableDecl(Clause<Type>),
4 RowDecl(Clause<Expr>),
5 }
6
7 #[derive(Debug,PartialEq,Eq)]
8 pub struct Clause<T> {
9 pub name: String,
10 pub data: ClauseData<T>,
11 }
12
13 #[derive(Debug,PartialEq,Eq)]
14 pub enum Type {
15 AtomType,
16 IntType,
17 }
18
19 #[derive(Debug,PartialEq,Eq)]
20 pub enum ClauseData<T> {
21 TupleClause(Vec<T>),
22 RecordClause(Vec<Field<T>>),
23 }
24
25 #[derive(Debug,PartialEq,Eq)]
26 pub enum Expr {
27 Var(String),
28 Atom(String),
29 Num(i64),
30 }
31
32 #[derive(Debug,PartialEq,Eq)]
33 pub struct Field<T> {
34 pub name: String,
35 pub value: T,
36 }
1 use std::str::FromStr;
2 use ast::*;
3
4 grammar;
5
6 pub TopLevel: TopLevel = {
7 "table" <c:Clause<Type>> "." => TopLevel::TableDecl(c),
8 "insert" <c:Clause<Expr>> "." => TopLevel::RowDecl(c),
9 };
10
11 pub RowDecl: Clause<Expr> = Clause<Expr>;
12
13 Clause<T>: Clause<T> = {
14 <i:Ident> <d:Data<T>> => Clause { name: i, data: d }
15 };
16
17 Type: Type = {
18 "atom" => Type::AtomType,
19 "int" => Type::IntType,
20 };
21
22 Expr: Expr = {
23 <Ident> => Expr::Atom(<>),
24 <Var> => Expr::Var(<>),
25 <Num> => Expr::Num(<>),
26 };
27
28 Data<T>: ClauseData<T> = {
29 "(" <ls: Comma<T>> ")" => ClauseData::TupleClause(ls),
30 "{" <ls: Comma<Field<T>>> "}" => ClauseData::RecordClause(ls),
31 };
32
33 Field<T>: Field<T> = {
34 <i:Ident> ":" <t: T> => Field { name: i, value: t },
35 };
36
37 Comma<T>: Vec<T> = {
38 <v:(<T> ",")*> <e: T?> => match e {
39 None => v,
40 Some(e) => {
41 let mut v = v; v.push(e); v
42 }
43 }
44 };
45
46 Ident: String = <s:r"[a-z_][A-Za-z0-9_]*"> => s.to_string();
47 Var: String = <s:r"[A-Z][A-Za-z0-9_]*"> => s.to_string();
48
49 Num: i64 = <s:r"[0-9]*"> => i64::from_str(s).unwrap();
1 use std::str::FromStr;
2 use ast::*;
3 extern crate lalrpop_util as __lalrpop_util;
4
5 mod __parse__RowDecl {
6 #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)]
7
8 use std::str::FromStr;
9 use ast::*;
10 extern crate lalrpop_util as __lalrpop_util;
11 #[allow(dead_code)]
12 pub enum __Symbol<'input> {
13 Term_22_28_22(&'input str),
14 Term_22_29_22(&'input str),
15 Term_22_2c_22(&'input str),
16 Term_22_2e_22(&'input str),
17 Term_22_3a_22(&'input str),
18 Term_22atom_22(&'input str),
19 Term_22insert_22(&'input str),
20 Term_22int_22(&'input str),
21 Term_22table_22(&'input str),
22 Term_22_7b_22(&'input str),
23 Term_22_7d_22(&'input str),
24 Termr_23_22_5b0_2d9_5d_2a_22_23(&'input str),
25 Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(&'input str),
26 Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(&'input str),
27 Nt_28_3cExpr_3e_20_22_2c_22_29(Expr),
28 Nt_28_3cExpr_3e_20_22_2c_22_29_2a(::std::vec::Vec<Expr>),
29 Nt_28_3cExpr_3e_20_22_2c_22_29_2b(::std::vec::Vec<Expr>),
30 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(Field<Expr>),
31 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(::std::vec::Vec<Field<Expr>>),
32 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(::std::vec::Vec<Field<Expr>>),
33 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(Field<Type>),
34 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(::std::vec::Vec<Field<Type>>),
35 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(::std::vec::Vec<Field<Type>>),
36 Nt_28_3cType_3e_20_22_2c_22_29(Type),
37 Nt_28_3cType_3e_20_22_2c_22_29_2a(::std::vec::Vec<Type>),
38 Nt_28_3cType_3e_20_22_2c_22_29_2b(::std::vec::Vec<Type>),
39 NtClause_3cExpr_3e(Clause<Expr>),
40 NtClause_3cType_3e(Clause<Type>),
41 NtComma_3cExpr_3e(Vec<Expr>),
42 NtComma_3cField_3cExpr_3e_3e(Vec<Field<Expr>>),
43 NtComma_3cField_3cType_3e_3e(Vec<Field<Type>>),
44 NtComma_3cType_3e(Vec<Type>),
45 NtData_3cExpr_3e(ClauseData<Expr>),
46 NtData_3cType_3e(ClauseData<Type>),
47 NtExpr(Expr),
48 NtExpr_3f(::std::option::Option<Expr>),
49 NtField_3cExpr_3e(Field<Expr>),
50 NtField_3cExpr_3e_3f(::std::option::Option<Field<Expr>>),
51 NtField_3cType_3e(Field<Type>),
52 NtField_3cType_3e_3f(::std::option::Option<Field<Type>>),
53 NtIdent(String),
54 NtNum(i64),
55 NtRowDecl(Clause<Expr>),
56 NtTopLevel(TopLevel),
57 NtType(Type),
58 NtType_3f(::std::option::Option<Type>),
59 NtVar(String),
60 Nt____RowDecl(Clause<Expr>),
61 Nt____TopLevel(TopLevel),
62 }
63 const __ACTION: &'static [i32] = &[
64 // State 0
65 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5,
66 // State 1
67 -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56, -56,
68 // State 2
69 7, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0,
70 // State 3
71 -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64, -64,
72 // State 4
73 -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
74 // State 5
75 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
76 // State 6
77 0, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 5,
78 // State 7
79 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28, 0, 0, 5,
80 // State 8
81 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 5,
82 // State 9
83 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
84 // State 10
85 0, -23, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
86 // State 11
87 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
88 // State 12
89 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
90 // State 13
91 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
92 // State 14
93 -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
94 // State 15
95 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
96 // State 16
97 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -30, 0, 0, 5,
98 // State 17
99 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0,
100 // State 18
101 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, -27, 0, 0, 0,
102 // State 19
103 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0,
104 // State 20
105 0, -25, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
106 // State 21
107 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
108 // State 22
109 -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
110 // State 23
111 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, -29, 0, 0, 0,
112 // State 24
113 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
114 // State 25
115 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
116 // State 26
117 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 16, 5,
118 // State 27
119 -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5,
120 // State 28
121 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
122 // State 29
123 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
124 ];
125 const __EOF_ACTION: &'static [i32] = &[
126 0,
127 -56,
128 0,
129 -64,
130 -54,
131 -21,
132 0,
133 0,
134 0,
135 0,
136 0,
137 -43,
138 -45,
139 -44,
140 -55,
141 -63,
142 0,
143 0,
144 0,
145 0,
146 0,
147 -39,
148 -4,
149 0,
150 -40,
151 -9,
152 0,
153 -5,
154 -10,
155 -48,
156 ];
157 const __GOTO: &'static [i32] = &[
158 // State 0
159 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0, 0,
160 // State 1
161 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
162 // State 2
163 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
164 // State 3
165 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
166 // State 4
167 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
168 // State 5
169 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
170 // State 6
171 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 14, 0, 0,
172 // State 7
173 0, 0, 0, 0, 0, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
174 // State 8
175 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 14, 0, 0,
176 // State 9
177 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
178 // State 10
179 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
180 // State 11
181 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
182 // State 12
183 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
184 // State 13
185 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
186 // State 14
187 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
188 // State 15
189 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
190 // State 16
191 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0,
192 // State 17
193 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
194 // State 18
195 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
196 // State 19
197 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
198 // State 20
199 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
200 // State 21
201 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
202 // State 22
203 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
204 // State 23
205 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
206 // State 24
207 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
208 // State 25
209 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
210 // State 26
211 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 12, 13, 0, 0, 0, 0, 14, 0, 0,
212 // State 27
213 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
214 // State 28
215 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
216 // State 29
217 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
218 ];
219 fn __expected_tokens(__state: usize) -> Vec<::std::string::String> {
220 const __TERMINAL: &'static [&'static str] = &[
221 r###""(""###,
222 r###"")""###,
223 r###"",""###,
224 r###"".""###,
225 r###"":""###,
226 r###""atom""###,
227 r###""insert""###,
228 r###""int""###,
229 r###""table""###,
230 r###""{""###,
231 r###""}""###,
232 r###"r#"[0-9]*"#"###,
233 r###"r#"[A-Z][A-Za-z0-9_]*"#"###,
234 r###"r#"[a-z_][A-Za-z0-9_]*"#"###,
235 ];
236 __ACTION[(__state * 14)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| {
237 if state == 0 {
238 None
239 } else {
240 Some(terminal.to_string())
241 }
242 }).collect()
243 }
244 pub fn parse_RowDecl<
245 'input,
246 >(
247 input: &'input str,
248 ) -> Result<Clause<Expr>, __lalrpop_util::ParseError<usize, (usize, &'input str), ()>>
249 {
250 let mut __tokens = super::__intern_token::__Matcher::new(input);
251 let mut __states = vec![0_i32];
252 let mut __symbols = vec![];
253 let mut __integer;
254 let mut __lookahead;
255 let mut __last_location = Default::default();
256 '__shift: loop {
257 __lookahead = match __tokens.next() {
258 Some(Ok(v)) => v,
259 None => break '__shift,
260 Some(Err(e)) => return Err(e),
261 };
262 __last_location = __lookahead.2.clone();
263 __integer = match __lookahead.1 {
264 (3, _) if true => 0,
265 (4, _) if true => 1,
266 (5, _) if true => 2,
267 (6, _) if true => 3,
268 (7, _) if true => 4,
269 (8, _) if true => 5,
270 (9, _) if true => 6,
271 (10, _) if true => 7,
272 (11, _) if true => 8,
273 (12, _) if true => 9,
274 (13, _) if true => 10,
275 (0, _) if true => 11,
276 (1, _) if true => 12,
277 (2, _) if true => 13,
278 _ => {
279 let __state = *__states.last().unwrap() as usize;
280 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
281 token: Some(__lookahead),
282 expected: __expected_tokens(__state),
283 };
284 return Err(__error);
285 }
286 };
287 '__inner: loop {
288 let __state = *__states.last().unwrap() as usize;
289 let __action = __ACTION[__state * 14 + __integer];
290 if __action > 0 {
291 let __symbol = match __integer {
292 0 => match __lookahead.1 {
293 (3, __tok0) => __Symbol::Term_22_28_22((__tok0)),
294 _ => unreachable!(),
295 },
296 1 => match __lookahead.1 {
297 (4, __tok0) => __Symbol::Term_22_29_22((__tok0)),
298 _ => unreachable!(),
299 },
300 2 => match __lookahead.1 {
301 (5, __tok0) => __Symbol::Term_22_2c_22((__tok0)),
302 _ => unreachable!(),
303 },
304 3 => match __lookahead.1 {
305 (6, __tok0) => __Symbol::Term_22_2e_22((__tok0)),
306 _ => unreachable!(),
307 },
308 4 => match __lookahead.1 {
309 (7, __tok0) => __Symbol::Term_22_3a_22((__tok0)),
310 _ => unreachable!(),
311 },
312 5 => match __lookahead.1 {
313 (8, __tok0) => __Symbol::Term_22atom_22((__tok0)),
314 _ => unreachable!(),
315 },
316 6 => match __lookahead.1 {
317 (9, __tok0) => __Symbol::Term_22insert_22((__tok0)),
318 _ => unreachable!(),
319 },
320 7 => match __lookahead.1 {
321 (10, __tok0) => __Symbol::Term_22int_22((__tok0)),
322 _ => unreachable!(),
323 },
324 8 => match __lookahead.1 {
325 (11, __tok0) => __Symbol::Term_22table_22((__tok0)),
326 _ => unreachable!(),
327 },
328 9 => match __lookahead.1 {
329 (12, __tok0) => __Symbol::Term_22_7b_22((__tok0)),
330 _ => unreachable!(),
331 },
332 10 => match __lookahead.1 {
333 (13, __tok0) => __Symbol::Term_22_7d_22((__tok0)),
334 _ => unreachable!(),
335 },
336 11 => match __lookahead.1 {
337 (0, __tok0) => __Symbol::Termr_23_22_5b0_2d9_5d_2a_22_23((__tok0)),
338 _ => unreachable!(),
339 },
340 12 => match __lookahead.1 {
341 (1, __tok0) => __Symbol::Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23((__tok0)),
342 _ => unreachable!(),
343 },
344 13 => match __lookahead.1 {
345 (2, __tok0) => __Symbol::Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23((__tok0)),
346 _ => unreachable!(),
347 },
348 _ => unreachable!(),
349 };
350 __states.push(__action - 1);
351 __symbols.push((__lookahead.0, __symbol, __lookahead.2));
352 continue '__shift;
353 } else if __action < 0 {
354 if let Some(r) = __reduce(input, __action, Some(&__lookahead.0), &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) {
355 return r;
356 }
357 } else {
358 let __state = *__states.last().unwrap() as usize;
359 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
360 token: Some(__lookahead),
361 expected: __expected_tokens(__state),
362 };
363 return Err(__error)
364 }
365 }
366 }
367 loop {
368 let __state = *__states.last().unwrap() as usize;
369 let __action = __EOF_ACTION[__state];
370 if __action < 0 {
371 if let Some(r) = __reduce(input, __action, None, &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) {
372 return r;
373 }
374 } else {
375 let __state = *__states.last().unwrap() as usize;
376 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
377 token: None,
378 expected: __expected_tokens(__state),
379 };
380 return Err(__error);
381 }
382 }
383 }
384 pub fn __reduce<
385 'input,
386 >(
387 input: &'input str,
388 __action: i32,
389 __lookahead_start: Option<&usize>,
390 __states: &mut ::std::vec::Vec<i32>,
391 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>,
392 _: ::std::marker::PhantomData<()>,
393 ) -> Option<Result<Clause<Expr>,__lalrpop_util::ParseError<usize, (usize, &'input str), ()>>>
394 {
395 let __nonterminal = match -__action {
396 1 => {
397 // (<Expr> ",") = Expr, "," => ActionFn(39);
398 let __sym1 = __pop_Term_22_2c_22(__symbols);
399 let __sym0 = __pop_NtExpr(__symbols);
400 let __start = __sym0.0.clone();
401 let __end = __sym1.2.clone();
402 let __nt = super::__action39::<>(input, __sym0, __sym1);
403 let __states_len = __states.len();
404 __states.truncate(__states_len - 2);
405 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29(__nt), __end));
406 0
407 }
408 2 => {
409 // (<Expr> ",")* = => ActionFn(37);
410 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
411 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
412 let __nt = super::__action37::<>(input, &__start, &__end);
413 let __states_len = __states.len();
414 __states.truncate(__states_len - 0);
415 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__nt), __end));
416 1
417 }
418 3 => {
419 // (<Expr> ",")* = (<Expr> ",")+ => ActionFn(38);
420 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
421 let __start = __sym0.0.clone();
422 let __end = __sym0.2.clone();
423 let __nt = super::__action38::<>(input, __sym0);
424 let __states_len = __states.len();
425 __states.truncate(__states_len - 1);
426 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__nt), __end));
427 1
428 }
429 4 => {
430 // (<Expr> ",")+ = Expr, "," => ActionFn(53);
431 let __sym1 = __pop_Term_22_2c_22(__symbols);
432 let __sym0 = __pop_NtExpr(__symbols);
433 let __start = __sym0.0.clone();
434 let __end = __sym1.2.clone();
435 let __nt = super::__action53::<>(input, __sym0, __sym1);
436 let __states_len = __states.len();
437 __states.truncate(__states_len - 2);
438 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__nt), __end));
439 2
440 }
441 5 => {
442 // (<Expr> ",")+ = (<Expr> ",")+, Expr, "," => ActionFn(54);
443 let __sym2 = __pop_Term_22_2c_22(__symbols);
444 let __sym1 = __pop_NtExpr(__symbols);
445 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
446 let __start = __sym0.0.clone();
447 let __end = __sym2.2.clone();
448 let __nt = super::__action54::<>(input, __sym0, __sym1, __sym2);
449 let __states_len = __states.len();
450 __states.truncate(__states_len - 3);
451 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__nt), __end));
452 2
453 }
454 6 => {
455 // (<Field<Expr>> ",") = Field<Expr>, "," => ActionFn(44);
456 let __sym1 = __pop_Term_22_2c_22(__symbols);
457 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
458 let __start = __sym0.0.clone();
459 let __end = __sym1.2.clone();
460 let __nt = super::__action44::<>(input, __sym0, __sym1);
461 let __states_len = __states.len();
462 __states.truncate(__states_len - 2);
463 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(__nt), __end));
464 3
465 }
466 7 => {
467 // (<Field<Expr>> ",")* = => ActionFn(42);
468 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
469 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
470 let __nt = super::__action42::<>(input, &__start, &__end);
471 let __states_len = __states.len();
472 __states.truncate(__states_len - 0);
473 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__nt), __end));
474 4
475 }
476 8 => {
477 // (<Field<Expr>> ",")* = (<Field<Expr>> ",")+ => ActionFn(43);
478 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
479 let __start = __sym0.0.clone();
480 let __end = __sym0.2.clone();
481 let __nt = super::__action43::<>(input, __sym0);
482 let __states_len = __states.len();
483 __states.truncate(__states_len - 1);
484 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__nt), __end));
485 4
486 }
487 9 => {
488 // (<Field<Expr>> ",")+ = Field<Expr>, "," => ActionFn(57);
489 let __sym1 = __pop_Term_22_2c_22(__symbols);
490 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
491 let __start = __sym0.0.clone();
492 let __end = __sym1.2.clone();
493 let __nt = super::__action57::<>(input, __sym0, __sym1);
494 let __states_len = __states.len();
495 __states.truncate(__states_len - 2);
496 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__nt), __end));
497 5
498 }
499 10 => {
500 // (<Field<Expr>> ",")+ = (<Field<Expr>> ",")+, Field<Expr>, "," => ActionFn(58);
501 let __sym2 = __pop_Term_22_2c_22(__symbols);
502 let __sym1 = __pop_NtField_3cExpr_3e(__symbols);
503 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
504 let __start = __sym0.0.clone();
505 let __end = __sym2.2.clone();
506 let __nt = super::__action58::<>(input, __sym0, __sym1, __sym2);
507 let __states_len = __states.len();
508 __states.truncate(__states_len - 3);
509 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__nt), __end));
510 5
511 }
512 11 => {
513 // (<Field<Type>> ",") = Field<Type>, "," => ActionFn(34);
514 let __sym1 = __pop_Term_22_2c_22(__symbols);
515 let __sym0 = __pop_NtField_3cType_3e(__symbols);
516 let __start = __sym0.0.clone();
517 let __end = __sym1.2.clone();
518 let __nt = super::__action34::<>(input, __sym0, __sym1);
519 let __states_len = __states.len();
520 __states.truncate(__states_len - 2);
521 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(__nt), __end));
522 6
523 }
524 12 => {
525 // (<Field<Type>> ",")* = => ActionFn(32);
526 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
527 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
528 let __nt = super::__action32::<>(input, &__start, &__end);
529 let __states_len = __states.len();
530 __states.truncate(__states_len - 0);
531 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__nt), __end));
532 7
533 }
534 13 => {
535 // (<Field<Type>> ",")* = (<Field<Type>> ",")+ => ActionFn(33);
536 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
537 let __start = __sym0.0.clone();
538 let __end = __sym0.2.clone();
539 let __nt = super::__action33::<>(input, __sym0);
540 let __states_len = __states.len();
541 __states.truncate(__states_len - 1);
542 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__nt), __end));
543 7
544 }
545 14 => {
546 // (<Field<Type>> ",")+ = Field<Type>, "," => ActionFn(61);
547 let __sym1 = __pop_Term_22_2c_22(__symbols);
548 let __sym0 = __pop_NtField_3cType_3e(__symbols);
549 let __start = __sym0.0.clone();
550 let __end = __sym1.2.clone();
551 let __nt = super::__action61::<>(input, __sym0, __sym1);
552 let __states_len = __states.len();
553 __states.truncate(__states_len - 2);
554 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__nt), __end));
555 8
556 }
557 15 => {
558 // (<Field<Type>> ",")+ = (<Field<Type>> ",")+, Field<Type>, "," => ActionFn(62);
559 let __sym2 = __pop_Term_22_2c_22(__symbols);
560 let __sym1 = __pop_NtField_3cType_3e(__symbols);
561 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
562 let __start = __sym0.0.clone();
563 let __end = __sym2.2.clone();
564 let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
565 let __states_len = __states.len();
566 __states.truncate(__states_len - 3);
567 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__nt), __end));
568 8
569 }
570 16 => {
571 // (<Type> ",") = Type, "," => ActionFn(29);
572 let __sym1 = __pop_Term_22_2c_22(__symbols);
573 let __sym0 = __pop_NtType(__symbols);
574 let __start = __sym0.0.clone();
575 let __end = __sym1.2.clone();
576 let __nt = super::__action29::<>(input, __sym0, __sym1);
577 let __states_len = __states.len();
578 __states.truncate(__states_len - 2);
579 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29(__nt), __end));
580 9
581 }
582 17 => {
583 // (<Type> ",")* = => ActionFn(27);
584 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
585 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
586 let __nt = super::__action27::<>(input, &__start, &__end);
587 let __states_len = __states.len();
588 __states.truncate(__states_len - 0);
589 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__nt), __end));
590 10
591 }
592 18 => {
593 // (<Type> ",")* = (<Type> ",")+ => ActionFn(28);
594 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
595 let __start = __sym0.0.clone();
596 let __end = __sym0.2.clone();
597 let __nt = super::__action28::<>(input, __sym0);
598 let __states_len = __states.len();
599 __states.truncate(__states_len - 1);
600 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__nt), __end));
601 10
602 }
603 19 => {
604 // (<Type> ",")+ = Type, "," => ActionFn(65);
605 let __sym1 = __pop_Term_22_2c_22(__symbols);
606 let __sym0 = __pop_NtType(__symbols);
607 let __start = __sym0.0.clone();
608 let __end = __sym1.2.clone();
609 let __nt = super::__action65::<>(input, __sym0, __sym1);
610 let __states_len = __states.len();
611 __states.truncate(__states_len - 2);
612 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__nt), __end));
613 11
614 }
615 20 => {
616 // (<Type> ",")+ = (<Type> ",")+, Type, "," => ActionFn(66);
617 let __sym2 = __pop_Term_22_2c_22(__symbols);
618 let __sym1 = __pop_NtType(__symbols);
619 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
620 let __start = __sym0.0.clone();
621 let __end = __sym2.2.clone();
622 let __nt = super::__action66::<>(input, __sym0, __sym1, __sym2);
623 let __states_len = __states.len();
624 __states.truncate(__states_len - 3);
625 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__nt), __end));
626 11
627 }
628 21 => {
629 // Clause<Expr> = Ident, Data<Expr> => ActionFn(13);
630 let __sym1 = __pop_NtData_3cExpr_3e(__symbols);
631 let __sym0 = __pop_NtIdent(__symbols);
632 let __start = __sym0.0.clone();
633 let __end = __sym1.2.clone();
634 let __nt = super::__action13::<>(input, __sym0, __sym1);
635 let __states_len = __states.len();
636 __states.truncate(__states_len - 2);
637 __symbols.push((__start, __Symbol::NtClause_3cExpr_3e(__nt), __end));
638 12
639 }
640 22 => {
641 // Clause<Type> = Ident, Data<Type> => ActionFn(14);
642 let __sym1 = __pop_NtData_3cType_3e(__symbols);
643 let __sym0 = __pop_NtIdent(__symbols);
644 let __start = __sym0.0.clone();
645 let __end = __sym1.2.clone();
646 let __nt = super::__action14::<>(input, __sym0, __sym1);
647 let __states_len = __states.len();
648 __states.truncate(__states_len - 2);
649 __symbols.push((__start, __Symbol::NtClause_3cType_3e(__nt), __end));
650 13
651 }
652 23 => {
653 // Comma<Expr> = Expr => ActionFn(69);
654 let __sym0 = __pop_NtExpr(__symbols);
655 let __start = __sym0.0.clone();
656 let __end = __sym0.2.clone();
657 let __nt = super::__action69::<>(input, __sym0);
658 let __states_len = __states.len();
659 __states.truncate(__states_len - 1);
660 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
661 14
662 }
663 24 => {
664 // Comma<Expr> = => ActionFn(70);
665 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
666 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
667 let __nt = super::__action70::<>(input, &__start, &__end);
668 let __states_len = __states.len();
669 __states.truncate(__states_len - 0);
670 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
671 14
672 }
673 25 => {
674 // Comma<Expr> = (<Expr> ",")+, Expr => ActionFn(71);
675 let __sym1 = __pop_NtExpr(__symbols);
676 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
677 let __start = __sym0.0.clone();
678 let __end = __sym1.2.clone();
679 let __nt = super::__action71::<>(input, __sym0, __sym1);
680 let __states_len = __states.len();
681 __states.truncate(__states_len - 2);
682 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
683 14
684 }
685 26 => {
686 // Comma<Expr> = (<Expr> ",")+ => ActionFn(72);
687 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
688 let __start = __sym0.0.clone();
689 let __end = __sym0.2.clone();
690 let __nt = super::__action72::<>(input, __sym0);
691 let __states_len = __states.len();
692 __states.truncate(__states_len - 1);
693 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
694 14
695 }
696 27 => {
697 // Comma<Field<Expr>> = Field<Expr> => ActionFn(73);
698 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
699 let __start = __sym0.0.clone();
700 let __end = __sym0.2.clone();
701 let __nt = super::__action73::<>(input, __sym0);
702 let __states_len = __states.len();
703 __states.truncate(__states_len - 1);
704 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
705 15
706 }
707 28 => {
708 // Comma<Field<Expr>> = => ActionFn(74);
709 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
710 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
711 let __nt = super::__action74::<>(input, &__start, &__end);
712 let __states_len = __states.len();
713 __states.truncate(__states_len - 0);
714 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
715 15
716 }
717 29 => {
718 // Comma<Field<Expr>> = (<Field<Expr>> ",")+, Field<Expr> => ActionFn(75);
719 let __sym1 = __pop_NtField_3cExpr_3e(__symbols);
720 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
721 let __start = __sym0.0.clone();
722 let __end = __sym1.2.clone();
723 let __nt = super::__action75::<>(input, __sym0, __sym1);
724 let __states_len = __states.len();
725 __states.truncate(__states_len - 2);
726 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
727 15
728 }
729 30 => {
730 // Comma<Field<Expr>> = (<Field<Expr>> ",")+ => ActionFn(76);
731 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
732 let __start = __sym0.0.clone();
733 let __end = __sym0.2.clone();
734 let __nt = super::__action76::<>(input, __sym0);
735 let __states_len = __states.len();
736 __states.truncate(__states_len - 1);
737 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
738 15
739 }
740 31 => {
741 // Comma<Field<Type>> = Field<Type> => ActionFn(77);
742 let __sym0 = __pop_NtField_3cType_3e(__symbols);
743 let __start = __sym0.0.clone();
744 let __end = __sym0.2.clone();
745 let __nt = super::__action77::<>(input, __sym0);
746 let __states_len = __states.len();
747 __states.truncate(__states_len - 1);
748 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
749 16
750 }
751 32 => {
752 // Comma<Field<Type>> = => ActionFn(78);
753 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
754 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
755 let __nt = super::__action78::<>(input, &__start, &__end);
756 let __states_len = __states.len();
757 __states.truncate(__states_len - 0);
758 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
759 16
760 }
761 33 => {
762 // Comma<Field<Type>> = (<Field<Type>> ",")+, Field<Type> => ActionFn(79);
763 let __sym1 = __pop_NtField_3cType_3e(__symbols);
764 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
765 let __start = __sym0.0.clone();
766 let __end = __sym1.2.clone();
767 let __nt = super::__action79::<>(input, __sym0, __sym1);
768 let __states_len = __states.len();
769 __states.truncate(__states_len - 2);
770 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
771 16
772 }
773 34 => {
774 // Comma<Field<Type>> = (<Field<Type>> ",")+ => ActionFn(80);
775 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
776 let __start = __sym0.0.clone();
777 let __end = __sym0.2.clone();
778 let __nt = super::__action80::<>(input, __sym0);
779 let __states_len = __states.len();
780 __states.truncate(__states_len - 1);
781 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
782 16
783 }
784 35 => {
785 // Comma<Type> = Type => ActionFn(81);
786 let __sym0 = __pop_NtType(__symbols);
787 let __start = __sym0.0.clone();
788 let __end = __sym0.2.clone();
789 let __nt = super::__action81::<>(input, __sym0);
790 let __states_len = __states.len();
791 __states.truncate(__states_len - 1);
792 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
793 17
794 }
795 36 => {
796 // Comma<Type> = => ActionFn(82);
797 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
798 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
799 let __nt = super::__action82::<>(input, &__start, &__end);
800 let __states_len = __states.len();
801 __states.truncate(__states_len - 0);
802 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
803 17
804 }
805 37 => {
806 // Comma<Type> = (<Type> ",")+, Type => ActionFn(83);
807 let __sym1 = __pop_NtType(__symbols);
808 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
809 let __start = __sym0.0.clone();
810 let __end = __sym1.2.clone();
811 let __nt = super::__action83::<>(input, __sym0, __sym1);
812 let __states_len = __states.len();
813 __states.truncate(__states_len - 2);
814 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
815 17
816 }
817 38 => {
818 // Comma<Type> = (<Type> ",")+ => ActionFn(84);
819 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
820 let __start = __sym0.0.clone();
821 let __end = __sym0.2.clone();
822 let __nt = super::__action84::<>(input, __sym0);
823 let __states_len = __states.len();
824 __states.truncate(__states_len - 1);
825 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
826 17
827 }
828 39 => {
829 // Data<Expr> = "(", Comma<Expr>, ")" => ActionFn(17);
830 let __sym2 = __pop_Term_22_29_22(__symbols);
831 let __sym1 = __pop_NtComma_3cExpr_3e(__symbols);
832 let __sym0 = __pop_Term_22_28_22(__symbols);
833 let __start = __sym0.0.clone();
834 let __end = __sym2.2.clone();
835 let __nt = super::__action17::<>(input, __sym0, __sym1, __sym2);
836 let __states_len = __states.len();
837 __states.truncate(__states_len - 3);
838 __symbols.push((__start, __Symbol::NtData_3cExpr_3e(__nt), __end));
839 18
840 }
841 40 => {
842 // Data<Expr> = "{", Comma<Field<Expr>>, "}" => ActionFn(18);
843 let __sym2 = __pop_Term_22_7d_22(__symbols);
844 let __sym1 = __pop_NtComma_3cField_3cExpr_3e_3e(__symbols);
845 let __sym0 = __pop_Term_22_7b_22(__symbols);
846 let __start = __sym0.0.clone();
847 let __end = __sym2.2.clone();
848 let __nt = super::__action18::<>(input, __sym0, __sym1, __sym2);
849 let __states_len = __states.len();
850 __states.truncate(__states_len - 3);
851 __symbols.push((__start, __Symbol::NtData_3cExpr_3e(__nt), __end));
852 18
853 }
854 41 => {
855 // Data<Type> = "(", Comma<Type>, ")" => ActionFn(15);
856 let __sym2 = __pop_Term_22_29_22(__symbols);
857 let __sym1 = __pop_NtComma_3cType_3e(__symbols);
858 let __sym0 = __pop_Term_22_28_22(__symbols);
859 let __start = __sym0.0.clone();
860 let __end = __sym2.2.clone();
861 let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
862 let __states_len = __states.len();
863 __states.truncate(__states_len - 3);
864 __symbols.push((__start, __Symbol::NtData_3cType_3e(__nt), __end));
865 19
866 }
867 42 => {
868 // Data<Type> = "{", Comma<Field<Type>>, "}" => ActionFn(16);
869 let __sym2 = __pop_Term_22_7d_22(__symbols);
870 let __sym1 = __pop_NtComma_3cField_3cType_3e_3e(__symbols);
871 let __sym0 = __pop_Term_22_7b_22(__symbols);
872 let __start = __sym0.0.clone();
873 let __end = __sym2.2.clone();
874 let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
875 let __states_len = __states.len();
876 __states.truncate(__states_len - 3);
877 __symbols.push((__start, __Symbol::NtData_3cType_3e(__nt), __end));
878 19
879 }
880 43 => {
881 // Expr = Ident => ActionFn(7);
882 let __sym0 = __pop_NtIdent(__symbols);
883 let __start = __sym0.0.clone();
884 let __end = __sym0.2.clone();
885 let __nt = super::__action7::<>(input, __sym0);
886 let __states_len = __states.len();
887 __states.truncate(__states_len - 1);
888 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
889 20
890 }
891 44 => {
892 // Expr = Var => ActionFn(8);
893 let __sym0 = __pop_NtVar(__symbols);
894 let __start = __sym0.0.clone();
895 let __end = __sym0.2.clone();
896 let __nt = super::__action8::<>(input, __sym0);
897 let __states_len = __states.len();
898 __states.truncate(__states_len - 1);
899 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
900 20
901 }
902 45 => {
903 // Expr = Num => ActionFn(9);
904 let __sym0 = __pop_NtNum(__symbols);
905 let __start = __sym0.0.clone();
906 let __end = __sym0.2.clone();
907 let __nt = super::__action9::<>(input, __sym0);
908 let __states_len = __states.len();
909 __states.truncate(__states_len - 1);
910 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
911 20
912 }
913 46 => {
914 // Expr? = Expr => ActionFn(35);
915 let __sym0 = __pop_NtExpr(__symbols);
916 let __start = __sym0.0.clone();
917 let __end = __sym0.2.clone();
918 let __nt = super::__action35::<>(input, __sym0);
919 let __states_len = __states.len();
920 __states.truncate(__states_len - 1);
921 __symbols.push((__start, __Symbol::NtExpr_3f(__nt), __end));
922 21
923 }
924 47 => {
925 // Expr? = => ActionFn(36);
926 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
927 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
928 let __nt = super::__action36::<>(input, &__start, &__end);
929 let __states_len = __states.len();
930 __states.truncate(__states_len - 0);
931 __symbols.push((__start, __Symbol::NtExpr_3f(__nt), __end));
932 21
933 }
934 48 => {
935 // Field<Expr> = Ident, ":", Expr => ActionFn(20);
936 let __sym2 = __pop_NtExpr(__symbols);
937 let __sym1 = __pop_Term_22_3a_22(__symbols);
938 let __sym0 = __pop_NtIdent(__symbols);
939 let __start = __sym0.0.clone();
940 let __end = __sym2.2.clone();
941 let __nt = super::__action20::<>(input, __sym0, __sym1, __sym2);
942 let __states_len = __states.len();
943 __states.truncate(__states_len - 3);
944 __symbols.push((__start, __Symbol::NtField_3cExpr_3e(__nt), __end));
945 22
946 }
947 49 => {
948 // Field<Expr>? = Field<Expr> => ActionFn(40);
949 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
950 let __start = __sym0.0.clone();
951 let __end = __sym0.2.clone();
952 let __nt = super::__action40::<>(input, __sym0);
953 let __states_len = __states.len();
954 __states.truncate(__states_len - 1);
955 __symbols.push((__start, __Symbol::NtField_3cExpr_3e_3f(__nt), __end));
956 23
957 }
958 50 => {
959 // Field<Expr>? = => ActionFn(41);
960 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
961 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
962 let __nt = super::__action41::<>(input, &__start, &__end);
963 let __states_len = __states.len();
964 __states.truncate(__states_len - 0);
965 __symbols.push((__start, __Symbol::NtField_3cExpr_3e_3f(__nt), __end));
966 23
967 }
968 51 => {
969 // Field<Type> = Ident, ":", Type => ActionFn(23);
970 let __sym2 = __pop_NtType(__symbols);
971 let __sym1 = __pop_Term_22_3a_22(__symbols);
972 let __sym0 = __pop_NtIdent(__symbols);
973 let __start = __sym0.0.clone();
974 let __end = __sym2.2.clone();
975 let __nt = super::__action23::<>(input, __sym0, __sym1, __sym2);
976 let __states_len = __states.len();
977 __states.truncate(__states_len - 3);
978 __symbols.push((__start, __Symbol::NtField_3cType_3e(__nt), __end));
979 24
980 }
981 52 => {
982 // Field<Type>? = Field<Type> => ActionFn(30);
983 let __sym0 = __pop_NtField_3cType_3e(__symbols);
984 let __start = __sym0.0.clone();
985 let __end = __sym0.2.clone();
986 let __nt = super::__action30::<>(input, __sym0);
987 let __states_len = __states.len();
988 __states.truncate(__states_len - 1);
989 __symbols.push((__start, __Symbol::NtField_3cType_3e_3f(__nt), __end));
990 25
991 }
992 53 => {
993 // Field<Type>? = => ActionFn(31);
994 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
995 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
996 let __nt = super::__action31::<>(input, &__start, &__end);
997 let __states_len = __states.len();
998 __states.truncate(__states_len - 0);
999 __symbols.push((__start, __Symbol::NtField_3cType_3e_3f(__nt), __end));
1000 25
1001 }
1002 54 => {
1003 // Ident = r#"[a-z_][A-Za-z0-9_]*"# => ActionFn(10);
1004 let __sym0 = __pop_Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__symbols);
1005 let __start = __sym0.0.clone();
1006 let __end = __sym0.2.clone();
1007 let __nt = super::__action10::<>(input, __sym0);
1008 let __states_len = __states.len();
1009 __states.truncate(__states_len - 1);
1010 __symbols.push((__start, __Symbol::NtIdent(__nt), __end));
1011 26
1012 }
1013 55 => {
1014 // Num = r#"[0-9]*"# => ActionFn(12);
1015 let __sym0 = __pop_Termr_23_22_5b0_2d9_5d_2a_22_23(__symbols);
1016 let __start = __sym0.0.clone();
1017 let __end = __sym0.2.clone();
1018 let __nt = super::__action12::<>(input, __sym0);
1019 let __states_len = __states.len();
1020 __states.truncate(__states_len - 1);
1021 __symbols.push((__start, __Symbol::NtNum(__nt), __end));
1022 27
1023 }
1024 56 => {
1025 // RowDecl = Clause<Expr> => ActionFn(4);
1026 let __sym0 = __pop_NtClause_3cExpr_3e(__symbols);
1027 let __start = __sym0.0.clone();
1028 let __end = __sym0.2.clone();
1029 let __nt = super::__action4::<>(input, __sym0);
1030 let __states_len = __states.len();
1031 __states.truncate(__states_len - 1);
1032 __symbols.push((__start, __Symbol::NtRowDecl(__nt), __end));
1033 28
1034 }
1035 57 => {
1036 // TopLevel = "table", Clause<Type>, "." => ActionFn(2);
1037 let __sym2 = __pop_Term_22_2e_22(__symbols);
1038 let __sym1 = __pop_NtClause_3cType_3e(__symbols);
1039 let __sym0 = __pop_Term_22table_22(__symbols);
1040 let __start = __sym0.0.clone();
1041 let __end = __sym2.2.clone();
1042 let __nt = super::__action2::<>(input, __sym0, __sym1, __sym2);
1043 let __states_len = __states.len();
1044 __states.truncate(__states_len - 3);
1045 __symbols.push((__start, __Symbol::NtTopLevel(__nt), __end));
1046 29
1047 }
1048 58 => {
1049 // TopLevel = "insert", Clause<Expr>, "." => ActionFn(3);
1050 let __sym2 = __pop_Term_22_2e_22(__symbols);
1051 let __sym1 = __pop_NtClause_3cExpr_3e(__symbols);
1052 let __sym0 = __pop_Term_22insert_22(__symbols);
1053 let __start = __sym0.0.clone();
1054 let __end = __sym2.2.clone();
1055 let __nt = super::__action3::<>(input, __sym0, __sym1, __sym2);
1056 let __states_len = __states.len();
1057 __states.truncate(__states_len - 3);
1058 __symbols.push((__start, __Symbol::NtTopLevel(__nt), __end));
1059 29
1060 }
1061 59 => {
1062 // Type = "atom" => ActionFn(5);
1063 let __sym0 = __pop_Term_22atom_22(__symbols);
1064 let __start = __sym0.0.clone();
1065 let __end = __sym0.2.clone();
1066 let __nt = super::__action5::<>(input, __sym0);
1067 let __states_len = __states.len();
1068 __states.truncate(__states_len - 1);
1069 __symbols.push((__start, __Symbol::NtType(__nt), __end));
1070 30
1071 }
1072 60 => {
1073 // Type = "int" => ActionFn(6);
1074 let __sym0 = __pop_Term_22int_22(__symbols);
1075 let __start = __sym0.0.clone();
1076 let __end = __sym0.2.clone();
1077 let __nt = super::__action6::<>(input, __sym0);
1078 let __states_len = __states.len();
1079 __states.truncate(__states_len - 1);
1080 __symbols.push((__start, __Symbol::NtType(__nt), __end));
1081 30
1082 }
1083 61 => {
1084 // Type? = Type => ActionFn(25);
1085 let __sym0 = __pop_NtType(__symbols);
1086 let __start = __sym0.0.clone();
1087 let __end = __sym0.2.clone();
1088 let __nt = super::__action25::<>(input, __sym0);
1089 let __states_len = __states.len();
1090 __states.truncate(__states_len - 1);
1091 __symbols.push((__start, __Symbol::NtType_3f(__nt), __end));
1092 31
1093 }
1094 62 => {
1095 // Type? = => ActionFn(26);
1096 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
1097 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
1098 let __nt = super::__action26::<>(input, &__start, &__end);
1099 let __states_len = __states.len();
1100 __states.truncate(__states_len - 0);
1101 __symbols.push((__start, __Symbol::NtType_3f(__nt), __end));
1102 31
1103 }
1104 63 => {
1105 // Var = r#"[A-Z][A-Za-z0-9_]*"# => ActionFn(11);
1106 let __sym0 = __pop_Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__symbols);
1107 let __start = __sym0.0.clone();
1108 let __end = __sym0.2.clone();
1109 let __nt = super::__action11::<>(input, __sym0);
1110 let __states_len = __states.len();
1111 __states.truncate(__states_len - 1);
1112 __symbols.push((__start, __Symbol::NtVar(__nt), __end));
1113 32
1114 }
1115 64 => {
1116 // __RowDecl = RowDecl => ActionFn(1);
1117 let __sym0 = __pop_NtRowDecl(__symbols);
1118 let __start = __sym0.0.clone();
1119 let __end = __sym0.2.clone();
1120 let __nt = super::__action1::<>(input, __sym0);
1121 return Some(Ok(__nt));
1122 }
1123 65 => {
1124 // __TopLevel = TopLevel => ActionFn(0);
1125 let __sym0 = __pop_NtTopLevel(__symbols);
1126 let __start = __sym0.0.clone();
1127 let __end = __sym0.2.clone();
1128 let __nt = super::__action0::<>(input, __sym0);
1129 let __states_len = __states.len();
1130 __states.truncate(__states_len - 1);
1131 __symbols.push((__start, __Symbol::Nt____TopLevel(__nt), __end));
1132 34
1133 }
1134 _ => panic!("invalid action code {}", __action)
1135 };
1136 let __state = *__states.last().unwrap() as usize;
1137 let __next_state = __GOTO[__state * 35 + __nonterminal] - 1;
1138 __states.push(__next_state);
1139 None
1140 }
1141 fn __pop_Term_22_28_22<
1142 'input,
1143 >(
1144 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1145 ) -> (usize, &'input str, usize) {
1146 match __symbols.pop().unwrap() {
1147 (__l, __Symbol::Term_22_28_22(__v), __r) => (__l, __v, __r),
1148 _ => panic!("symbol type mismatch")
1149 }
1150 }
1151 fn __pop_Term_22_29_22<
1152 'input,
1153 >(
1154 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1155 ) -> (usize, &'input str, usize) {
1156 match __symbols.pop().unwrap() {
1157 (__l, __Symbol::Term_22_29_22(__v), __r) => (__l, __v, __r),
1158 _ => panic!("symbol type mismatch")
1159 }
1160 }
1161 fn __pop_Term_22_2c_22<
1162 'input,
1163 >(
1164 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1165 ) -> (usize, &'input str, usize) {
1166 match __symbols.pop().unwrap() {
1167 (__l, __Symbol::Term_22_2c_22(__v), __r) => (__l, __v, __r),
1168 _ => panic!("symbol type mismatch")
1169 }
1170 }
1171 fn __pop_Term_22_2e_22<
1172 'input,
1173 >(
1174 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1175 ) -> (usize, &'input str, usize) {
1176 match __symbols.pop().unwrap() {
1177 (__l, __Symbol::Term_22_2e_22(__v), __r) => (__l, __v, __r),
1178 _ => panic!("symbol type mismatch")
1179 }
1180 }
1181 fn __pop_Term_22_3a_22<
1182 'input,
1183 >(
1184 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1185 ) -> (usize, &'input str, usize) {
1186 match __symbols.pop().unwrap() {
1187 (__l, __Symbol::Term_22_3a_22(__v), __r) => (__l, __v, __r),
1188 _ => panic!("symbol type mismatch")
1189 }
1190 }
1191 fn __pop_Term_22atom_22<
1192 'input,
1193 >(
1194 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1195 ) -> (usize, &'input str, usize) {
1196 match __symbols.pop().unwrap() {
1197 (__l, __Symbol::Term_22atom_22(__v), __r) => (__l, __v, __r),
1198 _ => panic!("symbol type mismatch")
1199 }
1200 }
1201 fn __pop_Term_22insert_22<
1202 'input,
1203 >(
1204 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1205 ) -> (usize, &'input str, usize) {
1206 match __symbols.pop().unwrap() {
1207 (__l, __Symbol::Term_22insert_22(__v), __r) => (__l, __v, __r),
1208 _ => panic!("symbol type mismatch")
1209 }
1210 }
1211 fn __pop_Term_22int_22<
1212 'input,
1213 >(
1214 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1215 ) -> (usize, &'input str, usize) {
1216 match __symbols.pop().unwrap() {
1217 (__l, __Symbol::Term_22int_22(__v), __r) => (__l, __v, __r),
1218 _ => panic!("symbol type mismatch")
1219 }
1220 }
1221 fn __pop_Term_22table_22<
1222 'input,
1223 >(
1224 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1225 ) -> (usize, &'input str, usize) {
1226 match __symbols.pop().unwrap() {
1227 (__l, __Symbol::Term_22table_22(__v), __r) => (__l, __v, __r),
1228 _ => panic!("symbol type mismatch")
1229 }
1230 }
1231 fn __pop_Term_22_7b_22<
1232 'input,
1233 >(
1234 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1235 ) -> (usize, &'input str, usize) {
1236 match __symbols.pop().unwrap() {
1237 (__l, __Symbol::Term_22_7b_22(__v), __r) => (__l, __v, __r),
1238 _ => panic!("symbol type mismatch")
1239 }
1240 }
1241 fn __pop_Term_22_7d_22<
1242 'input,
1243 >(
1244 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1245 ) -> (usize, &'input str, usize) {
1246 match __symbols.pop().unwrap() {
1247 (__l, __Symbol::Term_22_7d_22(__v), __r) => (__l, __v, __r),
1248 _ => panic!("symbol type mismatch")
1249 }
1250 }
1251 fn __pop_Termr_23_22_5b0_2d9_5d_2a_22_23<
1252 'input,
1253 >(
1254 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1255 ) -> (usize, &'input str, usize) {
1256 match __symbols.pop().unwrap() {
1257 (__l, __Symbol::Termr_23_22_5b0_2d9_5d_2a_22_23(__v), __r) => (__l, __v, __r),
1258 _ => panic!("symbol type mismatch")
1259 }
1260 }
1261 fn __pop_Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23<
1262 'input,
1263 >(
1264 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1265 ) -> (usize, &'input str, usize) {
1266 match __symbols.pop().unwrap() {
1267 (__l, __Symbol::Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__v), __r) => (__l, __v, __r),
1268 _ => panic!("symbol type mismatch")
1269 }
1270 }
1271 fn __pop_Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23<
1272 'input,
1273 >(
1274 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1275 ) -> (usize, &'input str, usize) {
1276 match __symbols.pop().unwrap() {
1277 (__l, __Symbol::Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__v), __r) => (__l, __v, __r),
1278 _ => panic!("symbol type mismatch")
1279 }
1280 }
1281 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29<
1282 'input,
1283 >(
1284 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1285 ) -> (usize, Expr, usize) {
1286 match __symbols.pop().unwrap() {
1287 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
1288 _ => panic!("symbol type mismatch")
1289 }
1290 }
1291 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2a<
1292 'input,
1293 >(
1294 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1295 ) -> (usize, ::std::vec::Vec<Expr>, usize) {
1296 match __symbols.pop().unwrap() {
1297 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
1298 _ => panic!("symbol type mismatch")
1299 }
1300 }
1301 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b<
1302 'input,
1303 >(
1304 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1305 ) -> (usize, ::std::vec::Vec<Expr>, usize) {
1306 match __symbols.pop().unwrap() {
1307 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
1308 _ => panic!("symbol type mismatch")
1309 }
1310 }
1311 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29<
1312 'input,
1313 >(
1314 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1315 ) -> (usize, Field<Expr>, usize) {
1316 match __symbols.pop().unwrap() {
1317 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
1318 _ => panic!("symbol type mismatch")
1319 }
1320 }
1321 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a<
1322 'input,
1323 >(
1324 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1325 ) -> (usize, ::std::vec::Vec<Field<Expr>>, usize) {
1326 match __symbols.pop().unwrap() {
1327 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
1328 _ => panic!("symbol type mismatch")
1329 }
1330 }
1331 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b<
1332 'input,
1333 >(
1334 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1335 ) -> (usize, ::std::vec::Vec<Field<Expr>>, usize) {
1336 match __symbols.pop().unwrap() {
1337 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
1338 _ => panic!("symbol type mismatch")
1339 }
1340 }
1341 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29<
1342 'input,
1343 >(
1344 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1345 ) -> (usize, Field<Type>, usize) {
1346 match __symbols.pop().unwrap() {
1347 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
1348 _ => panic!("symbol type mismatch")
1349 }
1350 }
1351 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a<
1352 'input,
1353 >(
1354 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1355 ) -> (usize, ::std::vec::Vec<Field<Type>>, usize) {
1356 match __symbols.pop().unwrap() {
1357 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
1358 _ => panic!("symbol type mismatch")
1359 }
1360 }
1361 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b<
1362 'input,
1363 >(
1364 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1365 ) -> (usize, ::std::vec::Vec<Field<Type>>, usize) {
1366 match __symbols.pop().unwrap() {
1367 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
1368 _ => panic!("symbol type mismatch")
1369 }
1370 }
1371 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29<
1372 'input,
1373 >(
1374 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1375 ) -> (usize, Type, usize) {
1376 match __symbols.pop().unwrap() {
1377 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
1378 _ => panic!("symbol type mismatch")
1379 }
1380 }
1381 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29_2a<
1382 'input,
1383 >(
1384 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1385 ) -> (usize, ::std::vec::Vec<Type>, usize) {
1386 match __symbols.pop().unwrap() {
1387 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
1388 _ => panic!("symbol type mismatch")
1389 }
1390 }
1391 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b<
1392 'input,
1393 >(
1394 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1395 ) -> (usize, ::std::vec::Vec<Type>, usize) {
1396 match __symbols.pop().unwrap() {
1397 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
1398 _ => panic!("symbol type mismatch")
1399 }
1400 }
1401 fn __pop_NtClause_3cExpr_3e<
1402 'input,
1403 >(
1404 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1405 ) -> (usize, Clause<Expr>, usize) {
1406 match __symbols.pop().unwrap() {
1407 (__l, __Symbol::NtClause_3cExpr_3e(__v), __r) => (__l, __v, __r),
1408 _ => panic!("symbol type mismatch")
1409 }
1410 }
1411 fn __pop_NtClause_3cType_3e<
1412 'input,
1413 >(
1414 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1415 ) -> (usize, Clause<Type>, usize) {
1416 match __symbols.pop().unwrap() {
1417 (__l, __Symbol::NtClause_3cType_3e(__v), __r) => (__l, __v, __r),
1418 _ => panic!("symbol type mismatch")
1419 }
1420 }
1421 fn __pop_NtComma_3cExpr_3e<
1422 'input,
1423 >(
1424 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1425 ) -> (usize, Vec<Expr>, usize) {
1426 match __symbols.pop().unwrap() {
1427 (__l, __Symbol::NtComma_3cExpr_3e(__v), __r) => (__l, __v, __r),
1428 _ => panic!("symbol type mismatch")
1429 }
1430 }
1431 fn __pop_NtComma_3cField_3cExpr_3e_3e<
1432 'input,
1433 >(
1434 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1435 ) -> (usize, Vec<Field<Expr>>, usize) {
1436 match __symbols.pop().unwrap() {
1437 (__l, __Symbol::NtComma_3cField_3cExpr_3e_3e(__v), __r) => (__l, __v, __r),
1438 _ => panic!("symbol type mismatch")
1439 }
1440 }
1441 fn __pop_NtComma_3cField_3cType_3e_3e<
1442 'input,
1443 >(
1444 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1445 ) -> (usize, Vec<Field<Type>>, usize) {
1446 match __symbols.pop().unwrap() {
1447 (__l, __Symbol::NtComma_3cField_3cType_3e_3e(__v), __r) => (__l, __v, __r),
1448 _ => panic!("symbol type mismatch")
1449 }
1450 }
1451 fn __pop_NtComma_3cType_3e<
1452 'input,
1453 >(
1454 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1455 ) -> (usize, Vec<Type>, usize) {
1456 match __symbols.pop().unwrap() {
1457 (__l, __Symbol::NtComma_3cType_3e(__v), __r) => (__l, __v, __r),
1458 _ => panic!("symbol type mismatch")
1459 }
1460 }
1461 fn __pop_NtData_3cExpr_3e<
1462 'input,
1463 >(
1464 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1465 ) -> (usize, ClauseData<Expr>, usize) {
1466 match __symbols.pop().unwrap() {
1467 (__l, __Symbol::NtData_3cExpr_3e(__v), __r) => (__l, __v, __r),
1468 _ => panic!("symbol type mismatch")
1469 }
1470 }
1471 fn __pop_NtData_3cType_3e<
1472 'input,
1473 >(
1474 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1475 ) -> (usize, ClauseData<Type>, usize) {
1476 match __symbols.pop().unwrap() {
1477 (__l, __Symbol::NtData_3cType_3e(__v), __r) => (__l, __v, __r),
1478 _ => panic!("symbol type mismatch")
1479 }
1480 }
1481 fn __pop_NtExpr<
1482 'input,
1483 >(
1484 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1485 ) -> (usize, Expr, usize) {
1486 match __symbols.pop().unwrap() {
1487 (__l, __Symbol::NtExpr(__v), __r) => (__l, __v, __r),
1488 _ => panic!("symbol type mismatch")
1489 }
1490 }
1491 fn __pop_NtExpr_3f<
1492 'input,
1493 >(
1494 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1495 ) -> (usize, ::std::option::Option<Expr>, usize) {
1496 match __symbols.pop().unwrap() {
1497 (__l, __Symbol::NtExpr_3f(__v), __r) => (__l, __v, __r),
1498 _ => panic!("symbol type mismatch")
1499 }
1500 }
1501 fn __pop_NtField_3cExpr_3e<
1502 'input,
1503 >(
1504 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1505 ) -> (usize, Field<Expr>, usize) {
1506 match __symbols.pop().unwrap() {
1507 (__l, __Symbol::NtField_3cExpr_3e(__v), __r) => (__l, __v, __r),
1508 _ => panic!("symbol type mismatch")
1509 }
1510 }
1511 fn __pop_NtField_3cExpr_3e_3f<
1512 'input,
1513 >(
1514 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1515 ) -> (usize, ::std::option::Option<Field<Expr>>, usize) {
1516 match __symbols.pop().unwrap() {
1517 (__l, __Symbol::NtField_3cExpr_3e_3f(__v), __r) => (__l, __v, __r),
1518 _ => panic!("symbol type mismatch")
1519 }
1520 }
1521 fn __pop_NtField_3cType_3e<
1522 'input,
1523 >(
1524 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1525 ) -> (usize, Field<Type>, usize) {
1526 match __symbols.pop().unwrap() {
1527 (__l, __Symbol::NtField_3cType_3e(__v), __r) => (__l, __v, __r),
1528 _ => panic!("symbol type mismatch")
1529 }
1530 }
1531 fn __pop_NtField_3cType_3e_3f<
1532 'input,
1533 >(
1534 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1535 ) -> (usize, ::std::option::Option<Field<Type>>, usize) {
1536 match __symbols.pop().unwrap() {
1537 (__l, __Symbol::NtField_3cType_3e_3f(__v), __r) => (__l, __v, __r),
1538 _ => panic!("symbol type mismatch")
1539 }
1540 }
1541 fn __pop_NtIdent<
1542 'input,
1543 >(
1544 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1545 ) -> (usize, String, usize) {
1546 match __symbols.pop().unwrap() {
1547 (__l, __Symbol::NtIdent(__v), __r) => (__l, __v, __r),
1548 _ => panic!("symbol type mismatch")
1549 }
1550 }
1551 fn __pop_NtNum<
1552 'input,
1553 >(
1554 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1555 ) -> (usize, i64, usize) {
1556 match __symbols.pop().unwrap() {
1557 (__l, __Symbol::NtNum(__v), __r) => (__l, __v, __r),
1558 _ => panic!("symbol type mismatch")
1559 }
1560 }
1561 fn __pop_NtRowDecl<
1562 'input,
1563 >(
1564 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1565 ) -> (usize, Clause<Expr>, usize) {
1566 match __symbols.pop().unwrap() {
1567 (__l, __Symbol::NtRowDecl(__v), __r) => (__l, __v, __r),
1568 _ => panic!("symbol type mismatch")
1569 }
1570 }
1571 fn __pop_NtTopLevel<
1572 'input,
1573 >(
1574 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1575 ) -> (usize, TopLevel, usize) {
1576 match __symbols.pop().unwrap() {
1577 (__l, __Symbol::NtTopLevel(__v), __r) => (__l, __v, __r),
1578 _ => panic!("symbol type mismatch")
1579 }
1580 }
1581 fn __pop_NtType<
1582 'input,
1583 >(
1584 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1585 ) -> (usize, Type, usize) {
1586 match __symbols.pop().unwrap() {
1587 (__l, __Symbol::NtType(__v), __r) => (__l, __v, __r),
1588 _ => panic!("symbol type mismatch")
1589 }
1590 }
1591 fn __pop_NtType_3f<
1592 'input,
1593 >(
1594 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1595 ) -> (usize, ::std::option::Option<Type>, usize) {
1596 match __symbols.pop().unwrap() {
1597 (__l, __Symbol::NtType_3f(__v), __r) => (__l, __v, __r),
1598 _ => panic!("symbol type mismatch")
1599 }
1600 }
1601 fn __pop_NtVar<
1602 'input,
1603 >(
1604 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1605 ) -> (usize, String, usize) {
1606 match __symbols.pop().unwrap() {
1607 (__l, __Symbol::NtVar(__v), __r) => (__l, __v, __r),
1608 _ => panic!("symbol type mismatch")
1609 }
1610 }
1611 fn __pop_Nt____RowDecl<
1612 'input,
1613 >(
1614 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1615 ) -> (usize, Clause<Expr>, usize) {
1616 match __symbols.pop().unwrap() {
1617 (__l, __Symbol::Nt____RowDecl(__v), __r) => (__l, __v, __r),
1618 _ => panic!("symbol type mismatch")
1619 }
1620 }
1621 fn __pop_Nt____TopLevel<
1622 'input,
1623 >(
1624 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
1625 ) -> (usize, TopLevel, usize) {
1626 match __symbols.pop().unwrap() {
1627 (__l, __Symbol::Nt____TopLevel(__v), __r) => (__l, __v, __r),
1628 _ => panic!("symbol type mismatch")
1629 }
1630 }
1631 }
1632 pub use self::__parse__RowDecl::parse_RowDecl;
1633
1634 mod __parse__TopLevel {
1635 #![allow(non_snake_case, non_camel_case_types, unused_mut, unused_variables, unused_imports)]
1636
1637 use std::str::FromStr;
1638 use ast::*;
1639 extern crate lalrpop_util as __lalrpop_util;
1640 #[allow(dead_code)]
1641 pub enum __Symbol<'input> {
1642 Term_22_28_22(&'input str),
1643 Term_22_29_22(&'input str),
1644 Term_22_2c_22(&'input str),
1645 Term_22_2e_22(&'input str),
1646 Term_22_3a_22(&'input str),
1647 Term_22atom_22(&'input str),
1648 Term_22insert_22(&'input str),
1649 Term_22int_22(&'input str),
1650 Term_22table_22(&'input str),
1651 Term_22_7b_22(&'input str),
1652 Term_22_7d_22(&'input str),
1653 Termr_23_22_5b0_2d9_5d_2a_22_23(&'input str),
1654 Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(&'input str),
1655 Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(&'input str),
1656 Nt_28_3cExpr_3e_20_22_2c_22_29(Expr),
1657 Nt_28_3cExpr_3e_20_22_2c_22_29_2a(::std::vec::Vec<Expr>),
1658 Nt_28_3cExpr_3e_20_22_2c_22_29_2b(::std::vec::Vec<Expr>),
1659 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(Field<Expr>),
1660 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(::std::vec::Vec<Field<Expr>>),
1661 Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(::std::vec::Vec<Field<Expr>>),
1662 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(Field<Type>),
1663 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(::std::vec::Vec<Field<Type>>),
1664 Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(::std::vec::Vec<Field<Type>>),
1665 Nt_28_3cType_3e_20_22_2c_22_29(Type),
1666 Nt_28_3cType_3e_20_22_2c_22_29_2a(::std::vec::Vec<Type>),
1667 Nt_28_3cType_3e_20_22_2c_22_29_2b(::std::vec::Vec<Type>),
1668 NtClause_3cExpr_3e(Clause<Expr>),
1669 NtClause_3cType_3e(Clause<Type>),
1670 NtComma_3cExpr_3e(Vec<Expr>),
1671 NtComma_3cField_3cExpr_3e_3e(Vec<Field<Expr>>),
1672 NtComma_3cField_3cType_3e_3e(Vec<Field<Type>>),
1673 NtComma_3cType_3e(Vec<Type>),
1674 NtData_3cExpr_3e(ClauseData<Expr>),
1675 NtData_3cType_3e(ClauseData<Type>),
1676 NtExpr(Expr),
1677 NtExpr_3f(::std::option::Option<Expr>),
1678 NtField_3cExpr_3e(Field<Expr>),
1679 NtField_3cExpr_3e_3f(::std::option::Option<Field<Expr>>),
1680 NtField_3cType_3e(Field<Type>),
1681 NtField_3cType_3e_3f(::std::option::Option<Field<Type>>),
1682 NtIdent(String),
1683 NtNum(i64),
1684 NtRowDecl(Clause<Expr>),
1685 NtTopLevel(TopLevel),
1686 NtType(Type),
1687 NtType_3f(::std::option::Option<Type>),
1688 NtVar(String),
1689 Nt____RowDecl(Clause<Expr>),
1690 Nt____TopLevel(TopLevel),
1691 }
1692 const __ACTION: &'static [i32] = &[
1693 // State 0
1694 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 0, 0, 0,
1695 // State 1
1696 -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65, -65,
1697 // State 2
1698 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
1699 // State 3
1700 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7,
1701 // State 4
1702 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1703 // State 5
1704 12, 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0,
1705 // State 6
1706 -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54, -54,
1707 // State 7
1708 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1709 // State 8
1710 16, 0, 0, 0, 0, 0, 0, 0, 0, 17, 0, 0, 0, 0,
1711 // State 9
1712 -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58, -58,
1713 // State 10
1714 -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21, -21,
1715 // State 11
1716 0, -24, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 7,
1717 // State 12
1718 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -28, 0, 0, 7,
1719 // State 13
1720 -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57, -57,
1721 // State 14
1722 -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22, -22,
1723 // State 15
1724 0, -36, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0,
1725 // State 16
1726 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -32, 0, 0, 7,
1727 // State 17
1728 0, -26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 7,
1729 // State 18
1730 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1731 // State 19
1732 0, -23, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1733 // State 20
1734 -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43,
1735 // State 21
1736 -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, -45,
1737 // State 22
1738 -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44, -44,
1739 // State 23
1740 -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55, -55,
1741 // State 24
1742 -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63, -63,
1743 // State 25
1744 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -30, 0, 0, 7,
1745 // State 26
1746 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0,
1747 // State 27
1748 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, -27, 0, 0, 0,
1749 // State 28
1750 0, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1751 // State 29
1752 0, -38, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0,
1753 // State 30
1754 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1755 // State 31
1756 0, -35, 48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1757 // State 32
1758 -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59, -59,
1759 // State 33
1760 -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60, -60,
1761 // State 34
1762 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -34, 0, 0, 7,
1763 // State 35
1764 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 0, 0,
1765 // State 36
1766 0, 0, 51, 0, 0, 0, 0, 0, 0, 0, -31, 0, 0, 0,
1767 // State 37
1768 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1769 // State 38
1770 0, -25, 53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1771 // State 39
1772 -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39, -39,
1773 // State 40
1774 -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4,
1775 // State 41
1776 0, 0, 54, 0, 0, 0, 0, 0, 0, 0, -29, 0, 0, 0,
1777 // State 42
1778 -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40, -40,
1779 // State 43
1780 -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9, -9,
1781 // State 44
1782 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 25, 7,
1783 // State 45
1784 0, -37, 56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1785 // State 46
1786 -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41, -41,
1787 // State 47
1788 -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19, -19,
1789 // State 48
1790 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, -33, 0, 0, 0,
1791 // State 49
1792 -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42, -42,
1793 // State 50
1794 -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14, -14,
1795 // State 51
1796 0, 0, 0, 0, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0,
1797 // State 52
1798 -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5,
1799 // State 53
1800 -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10, -10,
1801 // State 54
1802 -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48, -48,
1803 // State 55
1804 -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20, -20,
1805 // State 56
1806 -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15, -15,
1807 // State 57
1808 -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51, -51,
1809 ];
1810 const __EOF_ACTION: &'static [i32] = &[
1811 0,
1812 -65,
1813 0,
1814 0,
1815 0,
1816 0,
1817 -54,
1818 0,
1819 0,
1820 -58,
1821 -21,
1822 0,
1823 0,
1824 -57,
1825 -22,
1826 0,
1827 0,
1828 0,
1829 0,
1830 0,
1831 -43,
1832 -45,
1833 -44,
1834 -55,
1835 -63,
1836 0,
1837 0,
1838 0,
1839 0,
1840 0,
1841 0,
1842 0,
1843 -59,
1844 -60,
1845 0,
1846 0,
1847 0,
1848 0,
1849 0,
1850 -39,
1851 -4,
1852 0,
1853 -40,
1854 -9,
1855 0,
1856 0,
1857 -41,
1858 -19,
1859 0,
1860 -42,
1861 -14,
1862 0,
1863 -5,
1864 -10,
1865 -48,
1866 -20,
1867 -15,
1868 -51,
1869 ];
1870 const __GOTO: &'static [i32] = &[
1871 // State 0
1872 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0,
1873 // State 1
1874 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1875 // State 2
1876 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0,
1877 // State 3
1878 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0,
1879 // State 4
1880 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1881 // State 5
1882 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1883 // State 6
1884 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1885 // State 7
1886 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1887 // State 8
1888 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1889 // State 9
1890 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1891 // State 10
1892 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1893 // State 11
1894 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 23, 0, 0,
1895 // State 12
1896 0, 0, 0, 0, 0, 26, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0,
1897 // State 13
1898 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1899 // State 14
1900 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1901 // State 15
1902 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0,
1903 // State 16
1904 0, 0, 0, 0, 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 37, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
1905 // State 17
1906 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 23, 0, 0,
1907 // State 18
1908 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1909 // State 19
1910 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1911 // State 20
1912 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1913 // State 21
1914 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1915 // State 22
1916 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1917 // State 23
1918 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1919 // State 24
1920 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1921 // State 25
1922 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0,
1923 // State 26
1924 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1925 // State 27
1926 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1927 // State 28
1928 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1929 // State 29
1930 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0,
1931 // State 30
1932 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1933 // State 31
1934 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1935 // State 32
1936 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1937 // State 33
1938 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1939 // State 34
1940 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 38, 0, 0, 0, 0, 0, 0, 0, 0,
1941 // State 35
1942 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1943 // State 36
1944 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1945 // State 37
1946 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1947 // State 38
1948 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1949 // State 39
1950 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1951 // State 40
1952 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1953 // State 41
1954 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1955 // State 42
1956 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1957 // State 43
1958 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1959 // State 44
1960 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 23, 0, 0,
1961 // State 45
1962 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1963 // State 46
1964 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1965 // State 47
1966 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1967 // State 48
1968 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1969 // State 49
1970 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1971 // State 50
1972 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1973 // State 51
1974 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0,
1975 // State 52
1976 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1977 // State 53
1978 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1979 // State 54
1980 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1981 // State 55
1982 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1983 // State 56
1984 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1985 // State 57
1986 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1987 ];
1988 fn __expected_tokens(__state: usize) -> Vec<::std::string::String> {
1989 const __TERMINAL: &'static [&'static str] = &[
1990 r###""(""###,
1991 r###"")""###,
1992 r###"",""###,
1993 r###"".""###,
1994 r###"":""###,
1995 r###""atom""###,
1996 r###""insert""###,
1997 r###""int""###,
1998 r###""table""###,
1999 r###""{""###,
2000 r###""}""###,
2001 r###"r#"[0-9]*"#"###,
2002 r###"r#"[A-Z][A-Za-z0-9_]*"#"###,
2003 r###"r#"[a-z_][A-Za-z0-9_]*"#"###,
2004 ];
2005 __ACTION[(__state * 14)..].iter().zip(__TERMINAL).filter_map(|(&state, terminal)| {
2006 if state == 0 {
2007 None
2008 } else {
2009 Some(terminal.to_string())
2010 }
2011 }).collect()
2012 }
2013 pub fn parse_TopLevel<
2014 'input,
2015 >(
2016 input: &'input str,
2017 ) -> Result<TopLevel, __lalrpop_util::ParseError<usize, (usize, &'input str), ()>>
2018 {
2019 let mut __tokens = super::__intern_token::__Matcher::new(input);
2020 let mut __states = vec![0_i32];
2021 let mut __symbols = vec![];
2022 let mut __integer;
2023 let mut __lookahead;
2024 let mut __last_location = Default::default();
2025 '__shift: loop {
2026 __lookahead = match __tokens.next() {
2027 Some(Ok(v)) => v,
2028 None => break '__shift,
2029 Some(Err(e)) => return Err(e),
2030 };
2031 __last_location = __lookahead.2.clone();
2032 __integer = match __lookahead.1 {
2033 (3, _) if true => 0,
2034 (4, _) if true => 1,
2035 (5, _) if true => 2,
2036 (6, _) if true => 3,
2037 (7, _) if true => 4,
2038 (8, _) if true => 5,
2039 (9, _) if true => 6,
2040 (10, _) if true => 7,
2041 (11, _) if true => 8,
2042 (12, _) if true => 9,
2043 (13, _) if true => 10,
2044 (0, _) if true => 11,
2045 (1, _) if true => 12,
2046 (2, _) if true => 13,
2047 _ => {
2048 let __state = *__states.last().unwrap() as usize;
2049 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
2050 token: Some(__lookahead),
2051 expected: __expected_tokens(__state),
2052 };
2053 return Err(__error);
2054 }
2055 };
2056 '__inner: loop {
2057 let __state = *__states.last().unwrap() as usize;
2058 let __action = __ACTION[__state * 14 + __integer];
2059 if __action > 0 {
2060 let __symbol = match __integer {
2061 0 => match __lookahead.1 {
2062 (3, __tok0) => __Symbol::Term_22_28_22((__tok0)),
2063 _ => unreachable!(),
2064 },
2065 1 => match __lookahead.1 {
2066 (4, __tok0) => __Symbol::Term_22_29_22((__tok0)),
2067 _ => unreachable!(),
2068 },
2069 2 => match __lookahead.1 {
2070 (5, __tok0) => __Symbol::Term_22_2c_22((__tok0)),
2071 _ => unreachable!(),
2072 },
2073 3 => match __lookahead.1 {
2074 (6, __tok0) => __Symbol::Term_22_2e_22((__tok0)),
2075 _ => unreachable!(),
2076 },
2077 4 => match __lookahead.1 {
2078 (7, __tok0) => __Symbol::Term_22_3a_22((__tok0)),
2079 _ => unreachable!(),
2080 },
2081 5 => match __lookahead.1 {
2082 (8, __tok0) => __Symbol::Term_22atom_22((__tok0)),
2083 _ => unreachable!(),
2084 },
2085 6 => match __lookahead.1 {
2086 (9, __tok0) => __Symbol::Term_22insert_22((__tok0)),
2087 _ => unreachable!(),
2088 },
2089 7 => match __lookahead.1 {
2090 (10, __tok0) => __Symbol::Term_22int_22((__tok0)),
2091 _ => unreachable!(),
2092 },
2093 8 => match __lookahead.1 {
2094 (11, __tok0) => __Symbol::Term_22table_22((__tok0)),
2095 _ => unreachable!(),
2096 },
2097 9 => match __lookahead.1 {
2098 (12, __tok0) => __Symbol::Term_22_7b_22((__tok0)),
2099 _ => unreachable!(),
2100 },
2101 10 => match __lookahead.1 {
2102 (13, __tok0) => __Symbol::Term_22_7d_22((__tok0)),
2103 _ => unreachable!(),
2104 },
2105 11 => match __lookahead.1 {
2106 (0, __tok0) => __Symbol::Termr_23_22_5b0_2d9_5d_2a_22_23((__tok0)),
2107 _ => unreachable!(),
2108 },
2109 12 => match __lookahead.1 {
2110 (1, __tok0) => __Symbol::Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23((__tok0)),
2111 _ => unreachable!(),
2112 },
2113 13 => match __lookahead.1 {
2114 (2, __tok0) => __Symbol::Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23((__tok0)),
2115 _ => unreachable!(),
2116 },
2117 _ => unreachable!(),
2118 };
2119 __states.push(__action - 1);
2120 __symbols.push((__lookahead.0, __symbol, __lookahead.2));
2121 continue '__shift;
2122 } else if __action < 0 {
2123 if let Some(r) = __reduce(input, __action, Some(&__lookahead.0), &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) {
2124 return r;
2125 }
2126 } else {
2127 let __state = *__states.last().unwrap() as usize;
2128 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
2129 token: Some(__lookahead),
2130 expected: __expected_tokens(__state),
2131 };
2132 return Err(__error)
2133 }
2134 }
2135 }
2136 loop {
2137 let __state = *__states.last().unwrap() as usize;
2138 let __action = __EOF_ACTION[__state];
2139 if __action < 0 {
2140 if let Some(r) = __reduce(input, __action, None, &mut __states, &mut __symbols, ::std::marker::PhantomData::<()>) {
2141 return r;
2142 }
2143 } else {
2144 let __state = *__states.last().unwrap() as usize;
2145 let __error = __lalrpop_util::ParseError::UnrecognizedToken {
2146 token: None,
2147 expected: __expected_tokens(__state),
2148 };
2149 return Err(__error);
2150 }
2151 }
2152 }
2153 pub fn __reduce<
2154 'input,
2155 >(
2156 input: &'input str,
2157 __action: i32,
2158 __lookahead_start: Option<&usize>,
2159 __states: &mut ::std::vec::Vec<i32>,
2160 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>,
2161 _: ::std::marker::PhantomData<()>,
2162 ) -> Option<Result<TopLevel,__lalrpop_util::ParseError<usize, (usize, &'input str), ()>>>
2163 {
2164 let __nonterminal = match -__action {
2165 1 => {
2166 // (<Expr> ",") = Expr, "," => ActionFn(39);
2167 let __sym1 = __pop_Term_22_2c_22(__symbols);
2168 let __sym0 = __pop_NtExpr(__symbols);
2169 let __start = __sym0.0.clone();
2170 let __end = __sym1.2.clone();
2171 let __nt = super::__action39::<>(input, __sym0, __sym1);
2172 let __states_len = __states.len();
2173 __states.truncate(__states_len - 2);
2174 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29(__nt), __end));
2175 0
2176 }
2177 2 => {
2178 // (<Expr> ",")* = => ActionFn(37);
2179 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2180 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2181 let __nt = super::__action37::<>(input, &__start, &__end);
2182 let __states_len = __states.len();
2183 __states.truncate(__states_len - 0);
2184 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__nt), __end));
2185 1
2186 }
2187 3 => {
2188 // (<Expr> ",")* = (<Expr> ",")+ => ActionFn(38);
2189 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
2190 let __start = __sym0.0.clone();
2191 let __end = __sym0.2.clone();
2192 let __nt = super::__action38::<>(input, __sym0);
2193 let __states_len = __states.len();
2194 __states.truncate(__states_len - 1);
2195 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__nt), __end));
2196 1
2197 }
2198 4 => {
2199 // (<Expr> ",")+ = Expr, "," => ActionFn(53);
2200 let __sym1 = __pop_Term_22_2c_22(__symbols);
2201 let __sym0 = __pop_NtExpr(__symbols);
2202 let __start = __sym0.0.clone();
2203 let __end = __sym1.2.clone();
2204 let __nt = super::__action53::<>(input, __sym0, __sym1);
2205 let __states_len = __states.len();
2206 __states.truncate(__states_len - 2);
2207 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__nt), __end));
2208 2
2209 }
2210 5 => {
2211 // (<Expr> ",")+ = (<Expr> ",")+, Expr, "," => ActionFn(54);
2212 let __sym2 = __pop_Term_22_2c_22(__symbols);
2213 let __sym1 = __pop_NtExpr(__symbols);
2214 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
2215 let __start = __sym0.0.clone();
2216 let __end = __sym2.2.clone();
2217 let __nt = super::__action54::<>(input, __sym0, __sym1, __sym2);
2218 let __states_len = __states.len();
2219 __states.truncate(__states_len - 3);
2220 __symbols.push((__start, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__nt), __end));
2221 2
2222 }
2223 6 => {
2224 // (<Field<Expr>> ",") = Field<Expr>, "," => ActionFn(44);
2225 let __sym1 = __pop_Term_22_2c_22(__symbols);
2226 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
2227 let __start = __sym0.0.clone();
2228 let __end = __sym1.2.clone();
2229 let __nt = super::__action44::<>(input, __sym0, __sym1);
2230 let __states_len = __states.len();
2231 __states.truncate(__states_len - 2);
2232 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(__nt), __end));
2233 3
2234 }
2235 7 => {
2236 // (<Field<Expr>> ",")* = => ActionFn(42);
2237 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2238 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2239 let __nt = super::__action42::<>(input, &__start, &__end);
2240 let __states_len = __states.len();
2241 __states.truncate(__states_len - 0);
2242 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__nt), __end));
2243 4
2244 }
2245 8 => {
2246 // (<Field<Expr>> ",")* = (<Field<Expr>> ",")+ => ActionFn(43);
2247 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
2248 let __start = __sym0.0.clone();
2249 let __end = __sym0.2.clone();
2250 let __nt = super::__action43::<>(input, __sym0);
2251 let __states_len = __states.len();
2252 __states.truncate(__states_len - 1);
2253 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__nt), __end));
2254 4
2255 }
2256 9 => {
2257 // (<Field<Expr>> ",")+ = Field<Expr>, "," => ActionFn(57);
2258 let __sym1 = __pop_Term_22_2c_22(__symbols);
2259 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
2260 let __start = __sym0.0.clone();
2261 let __end = __sym1.2.clone();
2262 let __nt = super::__action57::<>(input, __sym0, __sym1);
2263 let __states_len = __states.len();
2264 __states.truncate(__states_len - 2);
2265 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__nt), __end));
2266 5
2267 }
2268 10 => {
2269 // (<Field<Expr>> ",")+ = (<Field<Expr>> ",")+, Field<Expr>, "," => ActionFn(58);
2270 let __sym2 = __pop_Term_22_2c_22(__symbols);
2271 let __sym1 = __pop_NtField_3cExpr_3e(__symbols);
2272 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
2273 let __start = __sym0.0.clone();
2274 let __end = __sym2.2.clone();
2275 let __nt = super::__action58::<>(input, __sym0, __sym1, __sym2);
2276 let __states_len = __states.len();
2277 __states.truncate(__states_len - 3);
2278 __symbols.push((__start, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__nt), __end));
2279 5
2280 }
2281 11 => {
2282 // (<Field<Type>> ",") = Field<Type>, "," => ActionFn(34);
2283 let __sym1 = __pop_Term_22_2c_22(__symbols);
2284 let __sym0 = __pop_NtField_3cType_3e(__symbols);
2285 let __start = __sym0.0.clone();
2286 let __end = __sym1.2.clone();
2287 let __nt = super::__action34::<>(input, __sym0, __sym1);
2288 let __states_len = __states.len();
2289 __states.truncate(__states_len - 2);
2290 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(__nt), __end));
2291 6
2292 }
2293 12 => {
2294 // (<Field<Type>> ",")* = => ActionFn(32);
2295 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2296 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2297 let __nt = super::__action32::<>(input, &__start, &__end);
2298 let __states_len = __states.len();
2299 __states.truncate(__states_len - 0);
2300 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__nt), __end));
2301 7
2302 }
2303 13 => {
2304 // (<Field<Type>> ",")* = (<Field<Type>> ",")+ => ActionFn(33);
2305 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
2306 let __start = __sym0.0.clone();
2307 let __end = __sym0.2.clone();
2308 let __nt = super::__action33::<>(input, __sym0);
2309 let __states_len = __states.len();
2310 __states.truncate(__states_len - 1);
2311 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__nt), __end));
2312 7
2313 }
2314 14 => {
2315 // (<Field<Type>> ",")+ = Field<Type>, "," => ActionFn(61);
2316 let __sym1 = __pop_Term_22_2c_22(__symbols);
2317 let __sym0 = __pop_NtField_3cType_3e(__symbols);
2318 let __start = __sym0.0.clone();
2319 let __end = __sym1.2.clone();
2320 let __nt = super::__action61::<>(input, __sym0, __sym1);
2321 let __states_len = __states.len();
2322 __states.truncate(__states_len - 2);
2323 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__nt), __end));
2324 8
2325 }
2326 15 => {
2327 // (<Field<Type>> ",")+ = (<Field<Type>> ",")+, Field<Type>, "," => ActionFn(62);
2328 let __sym2 = __pop_Term_22_2c_22(__symbols);
2329 let __sym1 = __pop_NtField_3cType_3e(__symbols);
2330 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
2331 let __start = __sym0.0.clone();
2332 let __end = __sym2.2.clone();
2333 let __nt = super::__action62::<>(input, __sym0, __sym1, __sym2);
2334 let __states_len = __states.len();
2335 __states.truncate(__states_len - 3);
2336 __symbols.push((__start, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__nt), __end));
2337 8
2338 }
2339 16 => {
2340 // (<Type> ",") = Type, "," => ActionFn(29);
2341 let __sym1 = __pop_Term_22_2c_22(__symbols);
2342 let __sym0 = __pop_NtType(__symbols);
2343 let __start = __sym0.0.clone();
2344 let __end = __sym1.2.clone();
2345 let __nt = super::__action29::<>(input, __sym0, __sym1);
2346 let __states_len = __states.len();
2347 __states.truncate(__states_len - 2);
2348 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29(__nt), __end));
2349 9
2350 }
2351 17 => {
2352 // (<Type> ",")* = => ActionFn(27);
2353 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2354 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2355 let __nt = super::__action27::<>(input, &__start, &__end);
2356 let __states_len = __states.len();
2357 __states.truncate(__states_len - 0);
2358 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__nt), __end));
2359 10
2360 }
2361 18 => {
2362 // (<Type> ",")* = (<Type> ",")+ => ActionFn(28);
2363 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
2364 let __start = __sym0.0.clone();
2365 let __end = __sym0.2.clone();
2366 let __nt = super::__action28::<>(input, __sym0);
2367 let __states_len = __states.len();
2368 __states.truncate(__states_len - 1);
2369 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__nt), __end));
2370 10
2371 }
2372 19 => {
2373 // (<Type> ",")+ = Type, "," => ActionFn(65);
2374 let __sym1 = __pop_Term_22_2c_22(__symbols);
2375 let __sym0 = __pop_NtType(__symbols);
2376 let __start = __sym0.0.clone();
2377 let __end = __sym1.2.clone();
2378 let __nt = super::__action65::<>(input, __sym0, __sym1);
2379 let __states_len = __states.len();
2380 __states.truncate(__states_len - 2);
2381 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__nt), __end));
2382 11
2383 }
2384 20 => {
2385 // (<Type> ",")+ = (<Type> ",")+, Type, "," => ActionFn(66);
2386 let __sym2 = __pop_Term_22_2c_22(__symbols);
2387 let __sym1 = __pop_NtType(__symbols);
2388 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
2389 let __start = __sym0.0.clone();
2390 let __end = __sym2.2.clone();
2391 let __nt = super::__action66::<>(input, __sym0, __sym1, __sym2);
2392 let __states_len = __states.len();
2393 __states.truncate(__states_len - 3);
2394 __symbols.push((__start, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__nt), __end));
2395 11
2396 }
2397 21 => {
2398 // Clause<Expr> = Ident, Data<Expr> => ActionFn(13);
2399 let __sym1 = __pop_NtData_3cExpr_3e(__symbols);
2400 let __sym0 = __pop_NtIdent(__symbols);
2401 let __start = __sym0.0.clone();
2402 let __end = __sym1.2.clone();
2403 let __nt = super::__action13::<>(input, __sym0, __sym1);
2404 let __states_len = __states.len();
2405 __states.truncate(__states_len - 2);
2406 __symbols.push((__start, __Symbol::NtClause_3cExpr_3e(__nt), __end));
2407 12
2408 }
2409 22 => {
2410 // Clause<Type> = Ident, Data<Type> => ActionFn(14);
2411 let __sym1 = __pop_NtData_3cType_3e(__symbols);
2412 let __sym0 = __pop_NtIdent(__symbols);
2413 let __start = __sym0.0.clone();
2414 let __end = __sym1.2.clone();
2415 let __nt = super::__action14::<>(input, __sym0, __sym1);
2416 let __states_len = __states.len();
2417 __states.truncate(__states_len - 2);
2418 __symbols.push((__start, __Symbol::NtClause_3cType_3e(__nt), __end));
2419 13
2420 }
2421 23 => {
2422 // Comma<Expr> = Expr => ActionFn(69);
2423 let __sym0 = __pop_NtExpr(__symbols);
2424 let __start = __sym0.0.clone();
2425 let __end = __sym0.2.clone();
2426 let __nt = super::__action69::<>(input, __sym0);
2427 let __states_len = __states.len();
2428 __states.truncate(__states_len - 1);
2429 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
2430 14
2431 }
2432 24 => {
2433 // Comma<Expr> = => ActionFn(70);
2434 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2435 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2436 let __nt = super::__action70::<>(input, &__start, &__end);
2437 let __states_len = __states.len();
2438 __states.truncate(__states_len - 0);
2439 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
2440 14
2441 }
2442 25 => {
2443 // Comma<Expr> = (<Expr> ",")+, Expr => ActionFn(71);
2444 let __sym1 = __pop_NtExpr(__symbols);
2445 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
2446 let __start = __sym0.0.clone();
2447 let __end = __sym1.2.clone();
2448 let __nt = super::__action71::<>(input, __sym0, __sym1);
2449 let __states_len = __states.len();
2450 __states.truncate(__states_len - 2);
2451 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
2452 14
2453 }
2454 26 => {
2455 // Comma<Expr> = (<Expr> ",")+ => ActionFn(72);
2456 let __sym0 = __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__symbols);
2457 let __start = __sym0.0.clone();
2458 let __end = __sym0.2.clone();
2459 let __nt = super::__action72::<>(input, __sym0);
2460 let __states_len = __states.len();
2461 __states.truncate(__states_len - 1);
2462 __symbols.push((__start, __Symbol::NtComma_3cExpr_3e(__nt), __end));
2463 14
2464 }
2465 27 => {
2466 // Comma<Field<Expr>> = Field<Expr> => ActionFn(73);
2467 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
2468 let __start = __sym0.0.clone();
2469 let __end = __sym0.2.clone();
2470 let __nt = super::__action73::<>(input, __sym0);
2471 let __states_len = __states.len();
2472 __states.truncate(__states_len - 1);
2473 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
2474 15
2475 }
2476 28 => {
2477 // Comma<Field<Expr>> = => ActionFn(74);
2478 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2479 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2480 let __nt = super::__action74::<>(input, &__start, &__end);
2481 let __states_len = __states.len();
2482 __states.truncate(__states_len - 0);
2483 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
2484 15
2485 }
2486 29 => {
2487 // Comma<Field<Expr>> = (<Field<Expr>> ",")+, Field<Expr> => ActionFn(75);
2488 let __sym1 = __pop_NtField_3cExpr_3e(__symbols);
2489 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
2490 let __start = __sym0.0.clone();
2491 let __end = __sym1.2.clone();
2492 let __nt = super::__action75::<>(input, __sym0, __sym1);
2493 let __states_len = __states.len();
2494 __states.truncate(__states_len - 2);
2495 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
2496 15
2497 }
2498 30 => {
2499 // Comma<Field<Expr>> = (<Field<Expr>> ",")+ => ActionFn(76);
2500 let __sym0 = __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__symbols);
2501 let __start = __sym0.0.clone();
2502 let __end = __sym0.2.clone();
2503 let __nt = super::__action76::<>(input, __sym0);
2504 let __states_len = __states.len();
2505 __states.truncate(__states_len - 1);
2506 __symbols.push((__start, __Symbol::NtComma_3cField_3cExpr_3e_3e(__nt), __end));
2507 15
2508 }
2509 31 => {
2510 // Comma<Field<Type>> = Field<Type> => ActionFn(77);
2511 let __sym0 = __pop_NtField_3cType_3e(__symbols);
2512 let __start = __sym0.0.clone();
2513 let __end = __sym0.2.clone();
2514 let __nt = super::__action77::<>(input, __sym0);
2515 let __states_len = __states.len();
2516 __states.truncate(__states_len - 1);
2517 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
2518 16
2519 }
2520 32 => {
2521 // Comma<Field<Type>> = => ActionFn(78);
2522 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2523 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2524 let __nt = super::__action78::<>(input, &__start, &__end);
2525 let __states_len = __states.len();
2526 __states.truncate(__states_len - 0);
2527 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
2528 16
2529 }
2530 33 => {
2531 // Comma<Field<Type>> = (<Field<Type>> ",")+, Field<Type> => ActionFn(79);
2532 let __sym1 = __pop_NtField_3cType_3e(__symbols);
2533 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
2534 let __start = __sym0.0.clone();
2535 let __end = __sym1.2.clone();
2536 let __nt = super::__action79::<>(input, __sym0, __sym1);
2537 let __states_len = __states.len();
2538 __states.truncate(__states_len - 2);
2539 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
2540 16
2541 }
2542 34 => {
2543 // Comma<Field<Type>> = (<Field<Type>> ",")+ => ActionFn(80);
2544 let __sym0 = __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__symbols);
2545 let __start = __sym0.0.clone();
2546 let __end = __sym0.2.clone();
2547 let __nt = super::__action80::<>(input, __sym0);
2548 let __states_len = __states.len();
2549 __states.truncate(__states_len - 1);
2550 __symbols.push((__start, __Symbol::NtComma_3cField_3cType_3e_3e(__nt), __end));
2551 16
2552 }
2553 35 => {
2554 // Comma<Type> = Type => ActionFn(81);
2555 let __sym0 = __pop_NtType(__symbols);
2556 let __start = __sym0.0.clone();
2557 let __end = __sym0.2.clone();
2558 let __nt = super::__action81::<>(input, __sym0);
2559 let __states_len = __states.len();
2560 __states.truncate(__states_len - 1);
2561 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
2562 17
2563 }
2564 36 => {
2565 // Comma<Type> = => ActionFn(82);
2566 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2567 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2568 let __nt = super::__action82::<>(input, &__start, &__end);
2569 let __states_len = __states.len();
2570 __states.truncate(__states_len - 0);
2571 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
2572 17
2573 }
2574 37 => {
2575 // Comma<Type> = (<Type> ",")+, Type => ActionFn(83);
2576 let __sym1 = __pop_NtType(__symbols);
2577 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
2578 let __start = __sym0.0.clone();
2579 let __end = __sym1.2.clone();
2580 let __nt = super::__action83::<>(input, __sym0, __sym1);
2581 let __states_len = __states.len();
2582 __states.truncate(__states_len - 2);
2583 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
2584 17
2585 }
2586 38 => {
2587 // Comma<Type> = (<Type> ",")+ => ActionFn(84);
2588 let __sym0 = __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b(__symbols);
2589 let __start = __sym0.0.clone();
2590 let __end = __sym0.2.clone();
2591 let __nt = super::__action84::<>(input, __sym0);
2592 let __states_len = __states.len();
2593 __states.truncate(__states_len - 1);
2594 __symbols.push((__start, __Symbol::NtComma_3cType_3e(__nt), __end));
2595 17
2596 }
2597 39 => {
2598 // Data<Expr> = "(", Comma<Expr>, ")" => ActionFn(17);
2599 let __sym2 = __pop_Term_22_29_22(__symbols);
2600 let __sym1 = __pop_NtComma_3cExpr_3e(__symbols);
2601 let __sym0 = __pop_Term_22_28_22(__symbols);
2602 let __start = __sym0.0.clone();
2603 let __end = __sym2.2.clone();
2604 let __nt = super::__action17::<>(input, __sym0, __sym1, __sym2);
2605 let __states_len = __states.len();
2606 __states.truncate(__states_len - 3);
2607 __symbols.push((__start, __Symbol::NtData_3cExpr_3e(__nt), __end));
2608 18
2609 }
2610 40 => {
2611 // Data<Expr> = "{", Comma<Field<Expr>>, "}" => ActionFn(18);
2612 let __sym2 = __pop_Term_22_7d_22(__symbols);
2613 let __sym1 = __pop_NtComma_3cField_3cExpr_3e_3e(__symbols);
2614 let __sym0 = __pop_Term_22_7b_22(__symbols);
2615 let __start = __sym0.0.clone();
2616 let __end = __sym2.2.clone();
2617 let __nt = super::__action18::<>(input, __sym0, __sym1, __sym2);
2618 let __states_len = __states.len();
2619 __states.truncate(__states_len - 3);
2620 __symbols.push((__start, __Symbol::NtData_3cExpr_3e(__nt), __end));
2621 18
2622 }
2623 41 => {
2624 // Data<Type> = "(", Comma<Type>, ")" => ActionFn(15);
2625 let __sym2 = __pop_Term_22_29_22(__symbols);
2626 let __sym1 = __pop_NtComma_3cType_3e(__symbols);
2627 let __sym0 = __pop_Term_22_28_22(__symbols);
2628 let __start = __sym0.0.clone();
2629 let __end = __sym2.2.clone();
2630 let __nt = super::__action15::<>(input, __sym0, __sym1, __sym2);
2631 let __states_len = __states.len();
2632 __states.truncate(__states_len - 3);
2633 __symbols.push((__start, __Symbol::NtData_3cType_3e(__nt), __end));
2634 19
2635 }
2636 42 => {
2637 // Data<Type> = "{", Comma<Field<Type>>, "}" => ActionFn(16);
2638 let __sym2 = __pop_Term_22_7d_22(__symbols);
2639 let __sym1 = __pop_NtComma_3cField_3cType_3e_3e(__symbols);
2640 let __sym0 = __pop_Term_22_7b_22(__symbols);
2641 let __start = __sym0.0.clone();
2642 let __end = __sym2.2.clone();
2643 let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2);
2644 let __states_len = __states.len();
2645 __states.truncate(__states_len - 3);
2646 __symbols.push((__start, __Symbol::NtData_3cType_3e(__nt), __end));
2647 19
2648 }
2649 43 => {
2650 // Expr = Ident => ActionFn(7);
2651 let __sym0 = __pop_NtIdent(__symbols);
2652 let __start = __sym0.0.clone();
2653 let __end = __sym0.2.clone();
2654 let __nt = super::__action7::<>(input, __sym0);
2655 let __states_len = __states.len();
2656 __states.truncate(__states_len - 1);
2657 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
2658 20
2659 }
2660 44 => {
2661 // Expr = Var => ActionFn(8);
2662 let __sym0 = __pop_NtVar(__symbols);
2663 let __start = __sym0.0.clone();
2664 let __end = __sym0.2.clone();
2665 let __nt = super::__action8::<>(input, __sym0);
2666 let __states_len = __states.len();
2667 __states.truncate(__states_len - 1);
2668 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
2669 20
2670 }
2671 45 => {
2672 // Expr = Num => ActionFn(9);
2673 let __sym0 = __pop_NtNum(__symbols);
2674 let __start = __sym0.0.clone();
2675 let __end = __sym0.2.clone();
2676 let __nt = super::__action9::<>(input, __sym0);
2677 let __states_len = __states.len();
2678 __states.truncate(__states_len - 1);
2679 __symbols.push((__start, __Symbol::NtExpr(__nt), __end));
2680 20
2681 }
2682 46 => {
2683 // Expr? = Expr => ActionFn(35);
2684 let __sym0 = __pop_NtExpr(__symbols);
2685 let __start = __sym0.0.clone();
2686 let __end = __sym0.2.clone();
2687 let __nt = super::__action35::<>(input, __sym0);
2688 let __states_len = __states.len();
2689 __states.truncate(__states_len - 1);
2690 __symbols.push((__start, __Symbol::NtExpr_3f(__nt), __end));
2691 21
2692 }
2693 47 => {
2694 // Expr? = => ActionFn(36);
2695 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2696 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2697 let __nt = super::__action36::<>(input, &__start, &__end);
2698 let __states_len = __states.len();
2699 __states.truncate(__states_len - 0);
2700 __symbols.push((__start, __Symbol::NtExpr_3f(__nt), __end));
2701 21
2702 }
2703 48 => {
2704 // Field<Expr> = Ident, ":", Expr => ActionFn(20);
2705 let __sym2 = __pop_NtExpr(__symbols);
2706 let __sym1 = __pop_Term_22_3a_22(__symbols);
2707 let __sym0 = __pop_NtIdent(__symbols);
2708 let __start = __sym0.0.clone();
2709 let __end = __sym2.2.clone();
2710 let __nt = super::__action20::<>(input, __sym0, __sym1, __sym2);
2711 let __states_len = __states.len();
2712 __states.truncate(__states_len - 3);
2713 __symbols.push((__start, __Symbol::NtField_3cExpr_3e(__nt), __end));
2714 22
2715 }
2716 49 => {
2717 // Field<Expr>? = Field<Expr> => ActionFn(40);
2718 let __sym0 = __pop_NtField_3cExpr_3e(__symbols);
2719 let __start = __sym0.0.clone();
2720 let __end = __sym0.2.clone();
2721 let __nt = super::__action40::<>(input, __sym0);
2722 let __states_len = __states.len();
2723 __states.truncate(__states_len - 1);
2724 __symbols.push((__start, __Symbol::NtField_3cExpr_3e_3f(__nt), __end));
2725 23
2726 }
2727 50 => {
2728 // Field<Expr>? = => ActionFn(41);
2729 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2730 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2731 let __nt = super::__action41::<>(input, &__start, &__end);
2732 let __states_len = __states.len();
2733 __states.truncate(__states_len - 0);
2734 __symbols.push((__start, __Symbol::NtField_3cExpr_3e_3f(__nt), __end));
2735 23
2736 }
2737 51 => {
2738 // Field<Type> = Ident, ":", Type => ActionFn(23);
2739 let __sym2 = __pop_NtType(__symbols);
2740 let __sym1 = __pop_Term_22_3a_22(__symbols);
2741 let __sym0 = __pop_NtIdent(__symbols);
2742 let __start = __sym0.0.clone();
2743 let __end = __sym2.2.clone();
2744 let __nt = super::__action23::<>(input, __sym0, __sym1, __sym2);
2745 let __states_len = __states.len();
2746 __states.truncate(__states_len - 3);
2747 __symbols.push((__start, __Symbol::NtField_3cType_3e(__nt), __end));
2748 24
2749 }
2750 52 => {
2751 // Field<Type>? = Field<Type> => ActionFn(30);
2752 let __sym0 = __pop_NtField_3cType_3e(__symbols);
2753 let __start = __sym0.0.clone();
2754 let __end = __sym0.2.clone();
2755 let __nt = super::__action30::<>(input, __sym0);
2756 let __states_len = __states.len();
2757 __states.truncate(__states_len - 1);
2758 __symbols.push((__start, __Symbol::NtField_3cType_3e_3f(__nt), __end));
2759 25
2760 }
2761 53 => {
2762 // Field<Type>? = => ActionFn(31);
2763 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2764 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2765 let __nt = super::__action31::<>(input, &__start, &__end);
2766 let __states_len = __states.len();
2767 __states.truncate(__states_len - 0);
2768 __symbols.push((__start, __Symbol::NtField_3cType_3e_3f(__nt), __end));
2769 25
2770 }
2771 54 => {
2772 // Ident = r#"[a-z_][A-Za-z0-9_]*"# => ActionFn(10);
2773 let __sym0 = __pop_Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__symbols);
2774 let __start = __sym0.0.clone();
2775 let __end = __sym0.2.clone();
2776 let __nt = super::__action10::<>(input, __sym0);
2777 let __states_len = __states.len();
2778 __states.truncate(__states_len - 1);
2779 __symbols.push((__start, __Symbol::NtIdent(__nt), __end));
2780 26
2781 }
2782 55 => {
2783 // Num = r#"[0-9]*"# => ActionFn(12);
2784 let __sym0 = __pop_Termr_23_22_5b0_2d9_5d_2a_22_23(__symbols);
2785 let __start = __sym0.0.clone();
2786 let __end = __sym0.2.clone();
2787 let __nt = super::__action12::<>(input, __sym0);
2788 let __states_len = __states.len();
2789 __states.truncate(__states_len - 1);
2790 __symbols.push((__start, __Symbol::NtNum(__nt), __end));
2791 27
2792 }
2793 56 => {
2794 // RowDecl = Clause<Expr> => ActionFn(4);
2795 let __sym0 = __pop_NtClause_3cExpr_3e(__symbols);
2796 let __start = __sym0.0.clone();
2797 let __end = __sym0.2.clone();
2798 let __nt = super::__action4::<>(input, __sym0);
2799 let __states_len = __states.len();
2800 __states.truncate(__states_len - 1);
2801 __symbols.push((__start, __Symbol::NtRowDecl(__nt), __end));
2802 28
2803 }
2804 57 => {
2805 // TopLevel = "table", Clause<Type>, "." => ActionFn(2);
2806 let __sym2 = __pop_Term_22_2e_22(__symbols);
2807 let __sym1 = __pop_NtClause_3cType_3e(__symbols);
2808 let __sym0 = __pop_Term_22table_22(__symbols);
2809 let __start = __sym0.0.clone();
2810 let __end = __sym2.2.clone();
2811 let __nt = super::__action2::<>(input, __sym0, __sym1, __sym2);
2812 let __states_len = __states.len();
2813 __states.truncate(__states_len - 3);
2814 __symbols.push((__start, __Symbol::NtTopLevel(__nt), __end));
2815 29
2816 }
2817 58 => {
2818 // TopLevel = "insert", Clause<Expr>, "." => ActionFn(3);
2819 let __sym2 = __pop_Term_22_2e_22(__symbols);
2820 let __sym1 = __pop_NtClause_3cExpr_3e(__symbols);
2821 let __sym0 = __pop_Term_22insert_22(__symbols);
2822 let __start = __sym0.0.clone();
2823 let __end = __sym2.2.clone();
2824 let __nt = super::__action3::<>(input, __sym0, __sym1, __sym2);
2825 let __states_len = __states.len();
2826 __states.truncate(__states_len - 3);
2827 __symbols.push((__start, __Symbol::NtTopLevel(__nt), __end));
2828 29
2829 }
2830 59 => {
2831 // Type = "atom" => ActionFn(5);
2832 let __sym0 = __pop_Term_22atom_22(__symbols);
2833 let __start = __sym0.0.clone();
2834 let __end = __sym0.2.clone();
2835 let __nt = super::__action5::<>(input, __sym0);
2836 let __states_len = __states.len();
2837 __states.truncate(__states_len - 1);
2838 __symbols.push((__start, __Symbol::NtType(__nt), __end));
2839 30
2840 }
2841 60 => {
2842 // Type = "int" => ActionFn(6);
2843 let __sym0 = __pop_Term_22int_22(__symbols);
2844 let __start = __sym0.0.clone();
2845 let __end = __sym0.2.clone();
2846 let __nt = super::__action6::<>(input, __sym0);
2847 let __states_len = __states.len();
2848 __states.truncate(__states_len - 1);
2849 __symbols.push((__start, __Symbol::NtType(__nt), __end));
2850 30
2851 }
2852 61 => {
2853 // Type? = Type => ActionFn(25);
2854 let __sym0 = __pop_NtType(__symbols);
2855 let __start = __sym0.0.clone();
2856 let __end = __sym0.2.clone();
2857 let __nt = super::__action25::<>(input, __sym0);
2858 let __states_len = __states.len();
2859 __states.truncate(__states_len - 1);
2860 __symbols.push((__start, __Symbol::NtType_3f(__nt), __end));
2861 31
2862 }
2863 62 => {
2864 // Type? = => ActionFn(26);
2865 let __start = __symbols.last().map(|s| s.2.clone()).unwrap_or_default();
2866 let __end = __lookahead_start.cloned().unwrap_or_else(|| __start.clone());
2867 let __nt = super::__action26::<>(input, &__start, &__end);
2868 let __states_len = __states.len();
2869 __states.truncate(__states_len - 0);
2870 __symbols.push((__start, __Symbol::NtType_3f(__nt), __end));
2871 31
2872 }
2873 63 => {
2874 // Var = r#"[A-Z][A-Za-z0-9_]*"# => ActionFn(11);
2875 let __sym0 = __pop_Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__symbols);
2876 let __start = __sym0.0.clone();
2877 let __end = __sym0.2.clone();
2878 let __nt = super::__action11::<>(input, __sym0);
2879 let __states_len = __states.len();
2880 __states.truncate(__states_len - 1);
2881 __symbols.push((__start, __Symbol::NtVar(__nt), __end));
2882 32
2883 }
2884 64 => {
2885 // __RowDecl = RowDecl => ActionFn(1);
2886 let __sym0 = __pop_NtRowDecl(__symbols);
2887 let __start = __sym0.0.clone();
2888 let __end = __sym0.2.clone();
2889 let __nt = super::__action1::<>(input, __sym0);
2890 let __states_len = __states.len();
2891 __states.truncate(__states_len - 1);
2892 __symbols.push((__start, __Symbol::Nt____RowDecl(__nt), __end));
2893 33
2894 }
2895 65 => {
2896 // __TopLevel = TopLevel => ActionFn(0);
2897 let __sym0 = __pop_NtTopLevel(__symbols);
2898 let __start = __sym0.0.clone();
2899 let __end = __sym0.2.clone();
2900 let __nt = super::__action0::<>(input, __sym0);
2901 return Some(Ok(__nt));
2902 }
2903 _ => panic!("invalid action code {}", __action)
2904 };
2905 let __state = *__states.last().unwrap() as usize;
2906 let __next_state = __GOTO[__state * 35 + __nonterminal] - 1;
2907 __states.push(__next_state);
2908 None
2909 }
2910 fn __pop_Term_22_28_22<
2911 'input,
2912 >(
2913 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2914 ) -> (usize, &'input str, usize) {
2915 match __symbols.pop().unwrap() {
2916 (__l, __Symbol::Term_22_28_22(__v), __r) => (__l, __v, __r),
2917 _ => panic!("symbol type mismatch")
2918 }
2919 }
2920 fn __pop_Term_22_29_22<
2921 'input,
2922 >(
2923 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2924 ) -> (usize, &'input str, usize) {
2925 match __symbols.pop().unwrap() {
2926 (__l, __Symbol::Term_22_29_22(__v), __r) => (__l, __v, __r),
2927 _ => panic!("symbol type mismatch")
2928 }
2929 }
2930 fn __pop_Term_22_2c_22<
2931 'input,
2932 >(
2933 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2934 ) -> (usize, &'input str, usize) {
2935 match __symbols.pop().unwrap() {
2936 (__l, __Symbol::Term_22_2c_22(__v), __r) => (__l, __v, __r),
2937 _ => panic!("symbol type mismatch")
2938 }
2939 }
2940 fn __pop_Term_22_2e_22<
2941 'input,
2942 >(
2943 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2944 ) -> (usize, &'input str, usize) {
2945 match __symbols.pop().unwrap() {
2946 (__l, __Symbol::Term_22_2e_22(__v), __r) => (__l, __v, __r),
2947 _ => panic!("symbol type mismatch")
2948 }
2949 }
2950 fn __pop_Term_22_3a_22<
2951 'input,
2952 >(
2953 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2954 ) -> (usize, &'input str, usize) {
2955 match __symbols.pop().unwrap() {
2956 (__l, __Symbol::Term_22_3a_22(__v), __r) => (__l, __v, __r),
2957 _ => panic!("symbol type mismatch")
2958 }
2959 }
2960 fn __pop_Term_22atom_22<
2961 'input,
2962 >(
2963 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2964 ) -> (usize, &'input str, usize) {
2965 match __symbols.pop().unwrap() {
2966 (__l, __Symbol::Term_22atom_22(__v), __r) => (__l, __v, __r),
2967 _ => panic!("symbol type mismatch")
2968 }
2969 }
2970 fn __pop_Term_22insert_22<
2971 'input,
2972 >(
2973 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2974 ) -> (usize, &'input str, usize) {
2975 match __symbols.pop().unwrap() {
2976 (__l, __Symbol::Term_22insert_22(__v), __r) => (__l, __v, __r),
2977 _ => panic!("symbol type mismatch")
2978 }
2979 }
2980 fn __pop_Term_22int_22<
2981 'input,
2982 >(
2983 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2984 ) -> (usize, &'input str, usize) {
2985 match __symbols.pop().unwrap() {
2986 (__l, __Symbol::Term_22int_22(__v), __r) => (__l, __v, __r),
2987 _ => panic!("symbol type mismatch")
2988 }
2989 }
2990 fn __pop_Term_22table_22<
2991 'input,
2992 >(
2993 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
2994 ) -> (usize, &'input str, usize) {
2995 match __symbols.pop().unwrap() {
2996 (__l, __Symbol::Term_22table_22(__v), __r) => (__l, __v, __r),
2997 _ => panic!("symbol type mismatch")
2998 }
2999 }
3000 fn __pop_Term_22_7b_22<
3001 'input,
3002 >(
3003 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3004 ) -> (usize, &'input str, usize) {
3005 match __symbols.pop().unwrap() {
3006 (__l, __Symbol::Term_22_7b_22(__v), __r) => (__l, __v, __r),
3007 _ => panic!("symbol type mismatch")
3008 }
3009 }
3010 fn __pop_Term_22_7d_22<
3011 'input,
3012 >(
3013 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3014 ) -> (usize, &'input str, usize) {
3015 match __symbols.pop().unwrap() {
3016 (__l, __Symbol::Term_22_7d_22(__v), __r) => (__l, __v, __r),
3017 _ => panic!("symbol type mismatch")
3018 }
3019 }
3020 fn __pop_Termr_23_22_5b0_2d9_5d_2a_22_23<
3021 'input,
3022 >(
3023 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3024 ) -> (usize, &'input str, usize) {
3025 match __symbols.pop().unwrap() {
3026 (__l, __Symbol::Termr_23_22_5b0_2d9_5d_2a_22_23(__v), __r) => (__l, __v, __r),
3027 _ => panic!("symbol type mismatch")
3028 }
3029 }
3030 fn __pop_Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23<
3031 'input,
3032 >(
3033 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3034 ) -> (usize, &'input str, usize) {
3035 match __symbols.pop().unwrap() {
3036 (__l, __Symbol::Termr_23_22_5bA_2dZ_5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__v), __r) => (__l, __v, __r),
3037 _ => panic!("symbol type mismatch")
3038 }
3039 }
3040 fn __pop_Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23<
3041 'input,
3042 >(
3043 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3044 ) -> (usize, &'input str, usize) {
3045 match __symbols.pop().unwrap() {
3046 (__l, __Symbol::Termr_23_22_5ba_2dz___5d_5bA_2dZa_2dz0_2d9___5d_2a_22_23(__v), __r) => (__l, __v, __r),
3047 _ => panic!("symbol type mismatch")
3048 }
3049 }
3050 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29<
3051 'input,
3052 >(
3053 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3054 ) -> (usize, Expr, usize) {
3055 match __symbols.pop().unwrap() {
3056 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
3057 _ => panic!("symbol type mismatch")
3058 }
3059 }
3060 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2a<
3061 'input,
3062 >(
3063 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3064 ) -> (usize, ::std::vec::Vec<Expr>, usize) {
3065 match __symbols.pop().unwrap() {
3066 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
3067 _ => panic!("symbol type mismatch")
3068 }
3069 }
3070 fn __pop_Nt_28_3cExpr_3e_20_22_2c_22_29_2b<
3071 'input,
3072 >(
3073 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3074 ) -> (usize, ::std::vec::Vec<Expr>, usize) {
3075 match __symbols.pop().unwrap() {
3076 (__l, __Symbol::Nt_28_3cExpr_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
3077 _ => panic!("symbol type mismatch")
3078 }
3079 }
3080 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29<
3081 'input,
3082 >(
3083 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3084 ) -> (usize, Field<Expr>, usize) {
3085 match __symbols.pop().unwrap() {
3086 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
3087 _ => panic!("symbol type mismatch")
3088 }
3089 }
3090 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a<
3091 'input,
3092 >(
3093 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3094 ) -> (usize, ::std::vec::Vec<Field<Expr>>, usize) {
3095 match __symbols.pop().unwrap() {
3096 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
3097 _ => panic!("symbol type mismatch")
3098 }
3099 }
3100 fn __pop_Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b<
3101 'input,
3102 >(
3103 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3104 ) -> (usize, ::std::vec::Vec<Field<Expr>>, usize) {
3105 match __symbols.pop().unwrap() {
3106 (__l, __Symbol::Nt_28_3cField_3cExpr_3e_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
3107 _ => panic!("symbol type mismatch")
3108 }
3109 }
3110 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29<
3111 'input,
3112 >(
3113 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3114 ) -> (usize, Field<Type>, usize) {
3115 match __symbols.pop().unwrap() {
3116 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
3117 _ => panic!("symbol type mismatch")
3118 }
3119 }
3120 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a<
3121 'input,
3122 >(
3123 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3124 ) -> (usize, ::std::vec::Vec<Field<Type>>, usize) {
3125 match __symbols.pop().unwrap() {
3126 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
3127 _ => panic!("symbol type mismatch")
3128 }
3129 }
3130 fn __pop_Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b<
3131 'input,
3132 >(
3133 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3134 ) -> (usize, ::std::vec::Vec<Field<Type>>, usize) {
3135 match __symbols.pop().unwrap() {
3136 (__l, __Symbol::Nt_28_3cField_3cType_3e_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
3137 _ => panic!("symbol type mismatch")
3138 }
3139 }
3140 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29<
3141 'input,
3142 >(
3143 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3144 ) -> (usize, Type, usize) {
3145 match __symbols.pop().unwrap() {
3146 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29(__v), __r) => (__l, __v, __r),
3147 _ => panic!("symbol type mismatch")
3148 }
3149 }
3150 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29_2a<
3151 'input,
3152 >(
3153 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3154 ) -> (usize, ::std::vec::Vec<Type>, usize) {
3155 match __symbols.pop().unwrap() {
3156 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2a(__v), __r) => (__l, __v, __r),
3157 _ => panic!("symbol type mismatch")
3158 }
3159 }
3160 fn __pop_Nt_28_3cType_3e_20_22_2c_22_29_2b<
3161 'input,
3162 >(
3163 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3164 ) -> (usize, ::std::vec::Vec<Type>, usize) {
3165 match __symbols.pop().unwrap() {
3166 (__l, __Symbol::Nt_28_3cType_3e_20_22_2c_22_29_2b(__v), __r) => (__l, __v, __r),
3167 _ => panic!("symbol type mismatch")
3168 }
3169 }
3170 fn __pop_NtClause_3cExpr_3e<
3171 'input,
3172 >(
3173 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3174 ) -> (usize, Clause<Expr>, usize) {
3175 match __symbols.pop().unwrap() {
3176 (__l, __Symbol::NtClause_3cExpr_3e(__v), __r) => (__l, __v, __r),
3177 _ => panic!("symbol type mismatch")
3178 }
3179 }
3180 fn __pop_NtClause_3cType_3e<
3181 'input,
3182 >(
3183 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3184 ) -> (usize, Clause<Type>, usize) {
3185 match __symbols.pop().unwrap() {
3186 (__l, __Symbol::NtClause_3cType_3e(__v), __r) => (__l, __v, __r),
3187 _ => panic!("symbol type mismatch")
3188 }
3189 }
3190 fn __pop_NtComma_3cExpr_3e<
3191 'input,
3192 >(
3193 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3194 ) -> (usize, Vec<Expr>, usize) {
3195 match __symbols.pop().unwrap() {
3196 (__l, __Symbol::NtComma_3cExpr_3e(__v), __r) => (__l, __v, __r),
3197 _ => panic!("symbol type mismatch")
3198 }
3199 }
3200 fn __pop_NtComma_3cField_3cExpr_3e_3e<
3201 'input,
3202 >(
3203 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3204 ) -> (usize, Vec<Field<Expr>>, usize) {
3205 match __symbols.pop().unwrap() {
3206 (__l, __Symbol::NtComma_3cField_3cExpr_3e_3e(__v), __r) => (__l, __v, __r),
3207 _ => panic!("symbol type mismatch")
3208 }
3209 }
3210 fn __pop_NtComma_3cField_3cType_3e_3e<
3211 'input,
3212 >(
3213 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3214 ) -> (usize, Vec<Field<Type>>, usize) {
3215 match __symbols.pop().unwrap() {
3216 (__l, __Symbol::NtComma_3cField_3cType_3e_3e(__v), __r) => (__l, __v, __r),
3217 _ => panic!("symbol type mismatch")
3218 }
3219 }
3220 fn __pop_NtComma_3cType_3e<
3221 'input,
3222 >(
3223 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3224 ) -> (usize, Vec<Type>, usize) {
3225 match __symbols.pop().unwrap() {
3226 (__l, __Symbol::NtComma_3cType_3e(__v), __r) => (__l, __v, __r),
3227 _ => panic!("symbol type mismatch")
3228 }
3229 }
3230 fn __pop_NtData_3cExpr_3e<
3231 'input,
3232 >(
3233 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3234 ) -> (usize, ClauseData<Expr>, usize) {
3235 match __symbols.pop().unwrap() {
3236 (__l, __Symbol::NtData_3cExpr_3e(__v), __r) => (__l, __v, __r),
3237 _ => panic!("symbol type mismatch")
3238 }
3239 }
3240 fn __pop_NtData_3cType_3e<
3241 'input,
3242 >(
3243 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3244 ) -> (usize, ClauseData<Type>, usize) {
3245 match __symbols.pop().unwrap() {
3246 (__l, __Symbol::NtData_3cType_3e(__v), __r) => (__l, __v, __r),
3247 _ => panic!("symbol type mismatch")
3248 }
3249 }
3250 fn __pop_NtExpr<
3251 'input,
3252 >(
3253 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3254 ) -> (usize, Expr, usize) {
3255 match __symbols.pop().unwrap() {
3256 (__l, __Symbol::NtExpr(__v), __r) => (__l, __v, __r),
3257 _ => panic!("symbol type mismatch")
3258 }
3259 }
3260 fn __pop_NtExpr_3f<
3261 'input,
3262 >(
3263 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3264 ) -> (usize, ::std::option::Option<Expr>, usize) {
3265 match __symbols.pop().unwrap() {
3266 (__l, __Symbol::NtExpr_3f(__v), __r) => (__l, __v, __r),
3267 _ => panic!("symbol type mismatch")
3268 }
3269 }
3270 fn __pop_NtField_3cExpr_3e<
3271 'input,
3272 >(
3273 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3274 ) -> (usize, Field<Expr>, usize) {
3275 match __symbols.pop().unwrap() {
3276 (__l, __Symbol::NtField_3cExpr_3e(__v), __r) => (__l, __v, __r),
3277 _ => panic!("symbol type mismatch")
3278 }
3279 }
3280 fn __pop_NtField_3cExpr_3e_3f<
3281 'input,
3282 >(
3283 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3284 ) -> (usize, ::std::option::Option<Field<Expr>>, usize) {
3285 match __symbols.pop().unwrap() {
3286 (__l, __Symbol::NtField_3cExpr_3e_3f(__v), __r) => (__l, __v, __r),
3287 _ => panic!("symbol type mismatch")
3288 }
3289 }
3290 fn __pop_NtField_3cType_3e<
3291 'input,
3292 >(
3293 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3294 ) -> (usize, Field<Type>, usize) {
3295 match __symbols.pop().unwrap() {
3296 (__l, __Symbol::NtField_3cType_3e(__v), __r) => (__l, __v, __r),
3297 _ => panic!("symbol type mismatch")
3298 }
3299 }
3300 fn __pop_NtField_3cType_3e_3f<
3301 'input,
3302 >(
3303 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3304 ) -> (usize, ::std::option::Option<Field<Type>>, usize) {
3305 match __symbols.pop().unwrap() {
3306 (__l, __Symbol::NtField_3cType_3e_3f(__v), __r) => (__l, __v, __r),
3307 _ => panic!("symbol type mismatch")
3308 }
3309 }
3310 fn __pop_NtIdent<
3311 'input,
3312 >(
3313 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3314 ) -> (usize, String, usize) {
3315 match __symbols.pop().unwrap() {
3316 (__l, __Symbol::NtIdent(__v), __r) => (__l, __v, __r),
3317 _ => panic!("symbol type mismatch")
3318 }
3319 }
3320 fn __pop_NtNum<
3321 'input,
3322 >(
3323 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3324 ) -> (usize, i64, usize) {
3325 match __symbols.pop().unwrap() {
3326 (__l, __Symbol::NtNum(__v), __r) => (__l, __v, __r),
3327 _ => panic!("symbol type mismatch")
3328 }
3329 }
3330 fn __pop_NtRowDecl<
3331 'input,
3332 >(
3333 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3334 ) -> (usize, Clause<Expr>, usize) {
3335 match __symbols.pop().unwrap() {
3336 (__l, __Symbol::NtRowDecl(__v), __r) => (__l, __v, __r),
3337 _ => panic!("symbol type mismatch")
3338 }
3339 }
3340 fn __pop_NtTopLevel<
3341 'input,
3342 >(
3343 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3344 ) -> (usize, TopLevel, usize) {
3345 match __symbols.pop().unwrap() {
3346 (__l, __Symbol::NtTopLevel(__v), __r) => (__l, __v, __r),
3347 _ => panic!("symbol type mismatch")
3348 }
3349 }
3350 fn __pop_NtType<
3351 'input,
3352 >(
3353 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3354 ) -> (usize, Type, usize) {
3355 match __symbols.pop().unwrap() {
3356 (__l, __Symbol::NtType(__v), __r) => (__l, __v, __r),
3357 _ => panic!("symbol type mismatch")
3358 }
3359 }
3360 fn __pop_NtType_3f<
3361 'input,
3362 >(
3363 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3364 ) -> (usize, ::std::option::Option<Type>, usize) {
3365 match __symbols.pop().unwrap() {
3366 (__l, __Symbol::NtType_3f(__v), __r) => (__l, __v, __r),
3367 _ => panic!("symbol type mismatch")
3368 }
3369 }
3370 fn __pop_NtVar<
3371 'input,
3372 >(
3373 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3374 ) -> (usize, String, usize) {
3375 match __symbols.pop().unwrap() {
3376 (__l, __Symbol::NtVar(__v), __r) => (__l, __v, __r),
3377 _ => panic!("symbol type mismatch")
3378 }
3379 }
3380 fn __pop_Nt____RowDecl<
3381 'input,
3382 >(
3383 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3384 ) -> (usize, Clause<Expr>, usize) {
3385 match __symbols.pop().unwrap() {
3386 (__l, __Symbol::Nt____RowDecl(__v), __r) => (__l, __v, __r),
3387 _ => panic!("symbol type mismatch")
3388 }
3389 }
3390 fn __pop_Nt____TopLevel<
3391 'input,
3392 >(
3393 __symbols: &mut ::std::vec::Vec<(usize,__Symbol<'input>,usize)>
3394 ) -> (usize, TopLevel, usize) {
3395 match __symbols.pop().unwrap() {
3396 (__l, __Symbol::Nt____TopLevel(__v), __r) => (__l, __v, __r),
3397 _ => panic!("symbol type mismatch")
3398 }
3399 }
3400 }
3401 pub use self::__parse__TopLevel::parse_TopLevel;
3402 mod __intern_token {
3403 #![allow(unused_imports)]
3404 use std::str::FromStr;
3405 use ast::*;
3406 extern crate lalrpop_util as __lalrpop_util;
3407 extern crate regex as __regex;
3408 pub struct __Matcher<'input> {
3409 text: &'input str,
3410 consumed: usize,
3411 regex_set: __regex::RegexSet,
3412 regex_vec: Vec<__regex::Regex>,
3413 }
3414
3415 impl<'input> __Matcher<'input> {
3416 pub fn new(s: &'input str) -> __Matcher<'input> {
3417 let __strs: &[&str] = &[
3418 "^(?u:[0-9])*",
3419 "^(?u:[A-Z])(?u:[0-9A-Z_-_a-z])*",
3420 "^(?u:[_-_a-z])(?u:[0-9A-Z_-_a-z])*",
3421 "^(?u:\\()",
3422 "^(?u:\\))",
3423 "^(?u:,)",
3424 "^(?u:\\.)",
3425 "^(?u::)",
3426 "^(?u:atom)",
3427 "^(?u:insert)",
3428 "^(?u:int)",
3429 "^(?u:table)",
3430 "^(?u:\\{)",
3431 "^(?u:\\})",
3432 ];
3433 let __regex_set = __regex::RegexSet::new(__strs).unwrap();
3434 let __regex_vec = vec![
3435 __regex::Regex::new("^(?u:[0-9])*").unwrap(),
3436 __regex::Regex::new("^(?u:[A-Z])(?u:[0-9A-Z_-_a-z])*").unwrap(),
3437 __regex::Regex::new("^(?u:[_-_a-z])(?u:[0-9A-Z_-_a-z])*").unwrap(),
3438 __regex::Regex::new("^(?u:\\()").unwrap(),
3439 __regex::Regex::new("^(?u:\\))").unwrap(),
3440 __regex::Regex::new("^(?u:,)").unwrap(),
3441 __regex::Regex::new("^(?u:\\.)").unwrap(),
3442 __regex::Regex::new("^(?u::)").unwrap(),
3443 __regex::Regex::new("^(?u:atom)").unwrap(),
3444 __regex::Regex::new("^(?u:insert)").unwrap(),
3445 __regex::Regex::new("^(?u:int)").unwrap(),
3446 __regex::Regex::new("^(?u:table)").unwrap(),
3447 __regex::Regex::new("^(?u:\\{)").unwrap(),
3448 __regex::Regex::new("^(?u:\\})").unwrap(),
3449 ];
3450 __Matcher {
3451 text: s,
3452 consumed: 0,
3453 regex_set: __regex_set,
3454 regex_vec: __regex_vec,
3455 }
3456 }
3457 }
3458
3459 impl<'input> Iterator for __Matcher<'input> {
3460 type Item = Result<(usize, (usize, &'input str), usize), __lalrpop_util::ParseError<usize,(usize, &'input str),()>>;
3461
3462 fn next(&mut self) -> Option<Self::Item> {
3463 let __text = self.text.trim_left();
3464 let __whitespace = self.text.len() - __text.len();
3465 let __start_offset = self.consumed + __whitespace;
3466 if __text.is_empty() {
3467 self.text = __text;
3468 self.consumed = __start_offset;
3469 None
3470 } else {
3471 let __matches = self.regex_set.matches(__text);
3472 if !__matches.matched_any() {
3473 Some(Err(__lalrpop_util::ParseError::InvalidToken {
3474 location: __start_offset,
3475 }))
3476 } else {
3477 let mut __longest_match = 0;
3478 let mut __index = 0;
3479 for __i in 0 .. 14 {
3480 if __matches.matched(__i) {
3481 let __match = self.regex_vec[__i].find(__text).unwrap();
3482 let __len = __match.end();
3483 if __len >= __longest_match {
3484 __longest_match = __len;
3485 __index = __i;
3486 }
3487 }
3488 }
3489 let __result = &__text[..__longest_match];
3490 let __remaining = &__text[__longest_match..];
3491 let __end_offset = __start_offset + __longest_match;
3492 self.text = __remaining;
3493 self.consumed = __end_offset;
3494 Some(Ok((__start_offset, (__index, __result), __end_offset)))
3495 }
3496 }
3497 }
3498 }
3499 }
3500
3501 #[allow(unused_variables)]
3502 fn __action0<
3503 'input,
3504 >(
3505 input: &'input str,
3506 (_, __0, _): (usize, TopLevel, usize),
3507 ) -> TopLevel
3508 {
3509 (__0)
3510 }
3511
3512 #[allow(unused_variables)]
3513 fn __action1<
3514 'input,
3515 >(
3516 input: &'input str,
3517 (_, __0, _): (usize, Clause<Expr>, usize),
3518 ) -> Clause<Expr>
3519 {
3520 (__0)
3521 }
3522
3523 #[allow(unused_variables)]
3524 fn __action2<
3525 'input,
3526 >(
3527 input: &'input str,
3528 (_, _, _): (usize, &'input str, usize),
3529 (_, c, _): (usize, Clause<Type>, usize),
3530 (_, _, _): (usize, &'input str, usize),
3531 ) -> TopLevel
3532 {
3533 TopLevel::TableDecl(c)
3534 }
3535
3536 #[allow(unused_variables)]
3537 fn __action3<
3538 'input,
3539 >(
3540 input: &'input str,
3541 (_, _, _): (usize, &'input str, usize),
3542 (_, c, _): (usize, Clause<Expr>, usize),
3543 (_, _, _): (usize, &'input str, usize),
3544 ) -> TopLevel
3545 {
3546 TopLevel::RowDecl(c)
3547 }
3548
3549 #[allow(unused_variables)]
3550 fn __action4<
3551 'input,
3552 >(
3553 input: &'input str,
3554 (_, __0, _): (usize, Clause<Expr>, usize),
3555 ) -> Clause<Expr>
3556 {
3557 (__0)
3558 }
3559
3560 #[allow(unused_variables)]
3561 fn __action5<
3562 'input,
3563 >(
3564 input: &'input str,
3565 (_, __0, _): (usize, &'input str, usize),
3566 ) -> Type
3567 {
3568 Type::AtomType
3569 }
3570
3571 #[allow(unused_variables)]
3572 fn __action6<
3573 'input,
3574 >(
3575 input: &'input str,
3576 (_, __0, _): (usize, &'input str, usize),
3577 ) -> Type
3578 {
3579 Type::IntType
3580 }
3581
3582 #[allow(unused_variables)]
3583 fn __action7<
3584 'input,
3585 >(
3586 input: &'input str,
3587 (_, __0, _): (usize, String, usize),
3588 ) -> Expr
3589 {
3590 Expr::Atom(__0)
3591 }
3592
3593 #[allow(unused_variables)]
3594 fn __action8<
3595 'input,
3596 >(
3597 input: &'input str,
3598 (_, __0, _): (usize, String, usize),
3599 ) -> Expr
3600 {
3601 Expr::Var(__0)
3602 }
3603
3604 #[allow(unused_variables)]
3605 fn __action9<
3606 'input,
3607 >(
3608 input: &'input str,
3609 (_, __0, _): (usize, i64, usize),
3610 ) -> Expr
3611 {
3612 Expr::Num(__0)
3613 }
3614
3615 #[allow(unused_variables)]
3616 fn __action10<
3617 'input,
3618 >(
3619 input: &'input str,
3620 (_, s, _): (usize, &'input str, usize),
3621 ) -> String
3622 {
3623 s.to_string()
3624 }
3625
3626 #[allow(unused_variables)]
3627 fn __action11<
3628 'input,
3629 >(
3630 input: &'input str,
3631 (_, s, _): (usize, &'input str, usize),
3632 ) -> String
3633 {
3634 s.to_string()
3635 }
3636
3637 #[allow(unused_variables)]
3638 fn __action12<
3639 'input,
3640 >(
3641 input: &'input str,
3642 (_, s, _): (usize, &'input str, usize),
3643 ) -> i64
3644 {
3645 i64::from_str(s).unwrap()
3646 }
3647
3648 #[allow(unused_variables)]
3649 fn __action13<
3650 'input,
3651 >(
3652 input: &'input str,
3653 (_, i, _): (usize, String, usize),
3654 (_, d, _): (usize, ClauseData<Expr>, usize),
3655 ) -> Clause<Expr>
3656 {
3657 Clause { name: i, data: d }
3658 }
3659
3660 #[allow(unused_variables)]
3661 fn __action14<
3662 'input,
3663 >(
3664 input: &'input str,
3665 (_, i, _): (usize, String, usize),
3666 (_, d, _): (usize, ClauseData<Type>, usize),
3667 ) -> Clause<Type>
3668 {
3669 Clause { name: i, data: d }
3670 }
3671
3672 #[allow(unused_variables)]
3673 fn __action15<
3674 'input,
3675 >(
3676 input: &'input str,
3677 (_, _, _): (usize, &'input str, usize),
3678 (_, ls, _): (usize, Vec<Type>, usize),
3679 (_, _, _): (usize, &'input str, usize),
3680 ) -> ClauseData<Type>
3681 {
3682 ClauseData::TupleClause(ls)
3683 }
3684
3685 #[allow(unused_variables)]
3686 fn __action16<
3687 'input,
3688 >(
3689 input: &'input str,
3690 (_, _, _): (usize, &'input str, usize),
3691 (_, ls, _): (usize, Vec<Field<Type>>, usize),
3692 (_, _, _): (usize, &'input str, usize),
3693 ) -> ClauseData<Type>
3694 {
3695 ClauseData::RecordClause(ls)
3696 }
3697
3698 #[allow(unused_variables)]
3699 fn __action17<
3700 'input,
3701 >(
3702 input: &'input str,
3703 (_, _, _): (usize, &'input str, usize),
3704 (_, ls, _): (usize, Vec<Expr>, usize),
3705 (_, _, _): (usize, &'input str, usize),
3706 ) -> ClauseData<Expr>
3707 {
3708 ClauseData::TupleClause(ls)
3709 }
3710
3711 #[allow(unused_variables)]
3712 fn __action18<
3713 'input,
3714 >(
3715 input: &'input str,
3716 (_, _, _): (usize, &'input str, usize),
3717 (_, ls, _): (usize, Vec<Field<Expr>>, usize),
3718 (_, _, _): (usize, &'input str, usize),
3719 ) -> ClauseData<Expr>
3720 {
3721 ClauseData::RecordClause(ls)
3722 }
3723
3724 #[allow(unused_variables)]
3725 fn __action19<
3726 'input,
3727 >(
3728 input: &'input str,
3729 (_, v, _): (usize, ::std::vec::Vec<Field<Expr>>, usize),
3730 (_, e, _): (usize, ::std::option::Option<Field<Expr>>, usize),
3731 ) -> Vec<Field<Expr>>
3732 {
3733 match e {
3734 None => v,
3735 Some(e) => {
3736 let mut v = v; v.push(e); v
3737 }
3738 }
3739 }
3740
3741 #[allow(unused_variables)]
3742 fn __action20<
3743 'input,
3744 >(
3745 input: &'input str,
3746 (_, i, _): (usize, String, usize),
3747 (_, _, _): (usize, &'input str, usize),
3748 (_, t, _): (usize, Expr, usize),
3749 ) -> Field<Expr>
3750 {
3751 Field { name: i, value: t }
3752 }
3753
3754 #[allow(unused_variables)]
3755 fn __action21<
3756 'input,
3757 >(
3758 input: &'input str,
3759 (_, v, _): (usize, ::std::vec::Vec<Expr>, usize),
3760 (_, e, _): (usize, ::std::option::Option<Expr>, usize),
3761 ) -> Vec<Expr>
3762 {
3763 match e {
3764 None => v,
3765 Some(e) => {
3766 let mut v = v; v.push(e); v
3767 }
3768 }
3769 }
3770
3771 #[allow(unused_variables)]
3772 fn __action22<
3773 'input,
3774 >(
3775 input: &'input str,
3776 (_, v, _): (usize, ::std::vec::Vec<Field<Type>>, usize),
3777 (_, e, _): (usize, ::std::option::Option<Field<Type>>, usize),
3778 ) -> Vec<Field<Type>>
3779 {
3780 match e {
3781 None => v,
3782 Some(e) => {
3783 let mut v = v; v.push(e); v
3784 }
3785 }
3786 }
3787
3788 #[allow(unused_variables)]
3789 fn __action23<
3790 'input,
3791 >(
3792 input: &'input str,
3793 (_, i, _): (usize, String, usize),
3794 (_, _, _): (usize, &'input str, usize),
3795 (_, t, _): (usize, Type, usize),
3796 ) -> Field<Type>
3797 {
3798 Field { name: i, value: t }
3799 }
3800
3801 #[allow(unused_variables)]
3802 fn __action24<
3803 'input,
3804 >(
3805 input: &'input str,
3806 (_, v, _): (usize, ::std::vec::Vec<Type>, usize),
3807 (_, e, _): (usize, ::std::option::Option<Type>, usize),
3808 ) -> Vec<Type>
3809 {
3810 match e {
3811 None => v,
3812 Some(e) => {
3813 let mut v = v; v.push(e); v
3814 }
3815 }
3816 }
3817
3818 #[allow(unused_variables)]
3819 fn __action25<
3820 'input,
3821 >(
3822 input: &'input str,
3823 (_, __0, _): (usize, Type, usize),
3824 ) -> ::std::option::Option<Type>
3825 {
3826 Some(__0)
3827 }
3828
3829 #[allow(unused_variables)]
3830 fn __action26<
3831 'input,
3832 >(
3833 input: &'input str,
3834 __lookbehind: &usize,
3835 __lookahead: &usize,
3836 ) -> ::std::option::Option<Type>
3837 {
3838 None
3839 }
3840
3841 #[allow(unused_variables)]
3842 fn __action27<
3843 'input,
3844 >(
3845 input: &'input str,
3846 __lookbehind: &usize,
3847 __lookahead: &usize,
3848 ) -> ::std::vec::Vec<Type>
3849 {
3850 vec![]
3851 }
3852
3853 #[allow(unused_variables)]
3854 fn __action28<
3855 'input,
3856 >(
3857 input: &'input str,
3858 (_, v, _): (usize, ::std::vec::Vec<Type>, usize),
3859 ) -> ::std::vec::Vec<Type>
3860 {
3861 v
3862 }
3863
3864 #[allow(unused_variables)]
3865 fn __action29<
3866 'input,
3867 >(
3868 input: &'input str,
3869 (_, __0, _): (usize, Type, usize),
3870 (_, _, _): (usize, &'input str, usize),
3871 ) -> Type
3872 {
3873 (__0)
3874 }
3875
3876 #[allow(unused_variables)]
3877 fn __action30<
3878 'input,
3879 >(
3880 input: &'input str,
3881 (_, __0, _): (usize, Field<Type>, usize),
3882 ) -> ::std::option::Option<Field<Type>>
3883 {
3884 Some(__0)
3885 }
3886
3887 #[allow(unused_variables)]
3888 fn __action31<
3889 'input,
3890 >(
3891 input: &'input str,
3892 __lookbehind: &usize,
3893 __lookahead: &usize,
3894 ) -> ::std::option::Option<Field<Type>>
3895 {
3896 None
3897 }
3898
3899 #[allow(unused_variables)]
3900 fn __action32<
3901 'input,
3902 >(
3903 input: &'input str,
3904 __lookbehind: &usize,
3905 __lookahead: &usize,
3906 ) -> ::std::vec::Vec<Field<Type>>
3907 {
3908 vec![]
3909 }
3910
3911 #[allow(unused_variables)]
3912 fn __action33<
3913 'input,
3914 >(
3915 input: &'input str,
3916 (_, v, _): (usize, ::std::vec::Vec<Field<Type>>, usize),
3917 ) -> ::std::vec::Vec<Field<Type>>
3918 {
3919 v
3920 }
3921
3922 #[allow(unused_variables)]
3923 fn __action34<
3924 'input,
3925 >(
3926 input: &'input str,
3927 (_, __0, _): (usize, Field<Type>, usize),
3928 (_, _, _): (usize, &'input str, usize),
3929 ) -> Field<Type>
3930 {
3931 (__0)
3932 }
3933
3934 #[allow(unused_variables)]
3935 fn __action35<
3936 'input,
3937 >(
3938 input: &'input str,
3939 (_, __0, _): (usize, Expr, usize),
3940 ) -> ::std::option::Option<Expr>
3941 {
3942 Some(__0)
3943 }
3944
3945 #[allow(unused_variables)]
3946 fn __action36<
3947 'input,
3948 >(
3949 input: &'input str,
3950 __lookbehind: &usize,
3951 __lookahead: &usize,
3952 ) -> ::std::option::Option<Expr>
3953 {
3954 None
3955 }
3956
3957 #[allow(unused_variables)]
3958 fn __action37<
3959 'input,
3960 >(
3961 input: &'input str,
3962 __lookbehind: &usize,
3963 __lookahead: &usize,
3964 ) -> ::std::vec::Vec<Expr>
3965 {
3966 vec![]
3967 }
3968
3969 #[allow(unused_variables)]
3970 fn __action38<
3971 'input,
3972 >(
3973 input: &'input str,
3974 (_, v, _): (usize, ::std::vec::Vec<Expr>, usize),
3975 ) -> ::std::vec::Vec<Expr>
3976 {
3977 v
3978 }
3979
3980 #[allow(unused_variables)]
3981 fn __action39<
3982 'input,
3983 >(
3984 input: &'input str,
3985 (_, __0, _): (usize, Expr, usize),
3986 (_, _, _): (usize, &'input str, usize),
3987 ) -> Expr
3988 {
3989 (__0)
3990 }
3991
3992 #[allow(unused_variables)]
3993 fn __action40<
3994 'input,
3995 >(
3996 input: &'input str,
3997 (_, __0, _): (usize, Field<Expr>, usize),
3998 ) -> ::std::option::Option<Field<Expr>>
3999 {
4000 Some(__0)
4001 }
4002
4003 #[allow(unused_variables)]
4004 fn __action41<
4005 'input,
4006 >(
4007 input: &'input str,
4008 __lookbehind: &usize,
4009 __lookahead: &usize,
4010 ) -> ::std::option::Option<Field<Expr>>
4011 {
4012 None
4013 }
4014
4015 #[allow(unused_variables)]
4016 fn __action42<
4017 'input,
4018 >(
4019 input: &'input str,
4020 __lookbehind: &usize,
4021 __lookahead: &usize,
4022 ) -> ::std::vec::Vec<Field<Expr>>
4023 {
4024 vec![]
4025 }
4026
4027 #[allow(unused_variables)]
4028 fn __action43<
4029 'input,
4030 >(
4031 input: &'input str,
4032 (_, v, _): (usize, ::std::vec::Vec<Field<Expr>>, usize),
4033 ) -> ::std::vec::Vec<Field<Expr>>
4034 {
4035 v
4036 }
4037
4038 #[allow(unused_variables)]
4039 fn __action44<
4040 'input,
4041 >(
4042 input: &'input str,
4043 (_, __0, _): (usize, Field<Expr>, usize),
4044 (_, _, _): (usize, &'input str, usize),
4045 ) -> Field<Expr>
4046 {
4047 (__0)
4048 }
4049
4050 #[allow(unused_variables)]
4051 fn __action45<
4052 'input,
4053 >(
4054 input: &'input str,
4055 (_, __0, _): (usize, Field<Expr>, usize),
4056 ) -> ::std::vec::Vec<Field<Expr>>
4057 {
4058 vec![__0]
4059 }
4060
4061 #[allow(unused_variables)]
4062 fn __action46<
4063 'input,
4064 >(
4065 input: &'input str,
4066 (_, v, _): (usize, ::std::vec::Vec<Field<Expr>>, usize),
4067 (_, e, _): (usize, Field<Expr>, usize),
4068 ) -> ::std::vec::Vec<Field<Expr>>
4069 {
4070 { let mut v = v; v.push(e); v }
4071 }
4072
4073 #[allow(unused_variables)]
4074 fn __action47<
4075 'input,
4076 >(
4077 input: &'input str,
4078 (_, __0, _): (usize, Expr, usize),
4079 ) -> ::std::vec::Vec<Expr>
4080 {
4081 vec![__0]
4082 }
4083
4084 #[allow(unused_variables)]
4085 fn __action48<
4086 'input,
4087 >(
4088 input: &'input str,
4089 (_, v, _): (usize, ::std::vec::Vec<Expr>, usize),
4090 (_, e, _): (usize, Expr, usize),
4091 ) -> ::std::vec::Vec<Expr>
4092 {
4093 { let mut v = v; v.push(e); v }
4094 }
4095
4096 #[allow(unused_variables)]
4097 fn __action49<
4098 'input,
4099 >(
4100 input: &'input str,
4101 (_, __0, _): (usize, Field<Type>, usize),
4102 ) -> ::std::vec::Vec<Field<Type>>
4103 {
4104 vec![__0]
4105 }
4106
4107 #[allow(unused_variables)]
4108 fn __action50<
4109 'input,
4110 >(
4111 input: &'input str,
4112 (_, v, _): (usize, ::std::vec::Vec<Field<Type>>, usize),
4113 (_, e, _): (usize, Field<Type>, usize),
4114 ) -> ::std::vec::Vec<Field<Type>>
4115 {
4116 { let mut v = v; v.push(e); v }
4117 }
4118
4119 #[allow(unused_variables)]
4120 fn __action51<
4121 'input,
4122 >(
4123 input: &'input str,
4124 (_, __0, _): (usize, Type, usize),
4125 ) -> ::std::vec::Vec<Type>
4126 {
4127 vec![__0]
4128 }
4129
4130 #[allow(unused_variables)]
4131 fn __action52<
4132 'input,
4133 >(
4134 input: &'input str,
4135 (_, v, _): (usize, ::std::vec::Vec<Type>, usize),
4136 (_, e, _): (usize, Type, usize),
4137 ) -> ::std::vec::Vec<Type>
4138 {
4139 { let mut v = v; v.push(e); v }
4140 }
4141
4142 #[allow(unused_variables)]
4143 fn __action53<
4144 'input,
4145 >(
4146 input: &'input str,
4147 __0: (usize, Expr, usize),
4148 __1: (usize, &'input str, usize),
4149 ) -> ::std::vec::Vec<Expr>
4150 {
4151 let __start0 = __0.0.clone();
4152 let __end0 = __1.2.clone();
4153 let __temp0 = __action39(
4154 input,
4155 __0,
4156 __1,
4157 );
4158 let __temp0 = (__start0, __temp0, __end0);
4159 __action47(
4160 input,
4161 __temp0,
4162 )
4163 }
4164
4165 #[allow(unused_variables)]
4166 fn __action54<
4167 'input,
4168 >(
4169 input: &'input str,
4170 __0: (usize, ::std::vec::Vec<Expr>, usize),
4171 __1: (usize, Expr, usize),
4172 __2: (usize, &'input str, usize),
4173 ) -> ::std::vec::Vec<Expr>
4174 {
4175 let __start0 = __1.0.clone();
4176 let __end0 = __2.2.clone();
4177 let __temp0 = __action39(
4178 input,
4179 __1,
4180 __2,
4181 );
4182 let __temp0 = (__start0, __temp0, __end0);
4183 __action48(
4184 input,
4185 __0,
4186 __temp0,
4187 )
4188 }
4189
4190 #[allow(unused_variables)]
4191 fn __action55<
4192 'input,
4193 >(
4194 input: &'input str,
4195 __0: (usize, ::std::option::Option<Expr>, usize),
4196 ) -> Vec<Expr>
4197 {
4198 let __start0 = __0.0.clone();
4199 let __end0 = __0.0.clone();
4200 let __temp0 = __action37(
4201 input,
4202 &__start0,
4203 &__end0,
4204 );
4205 let __temp0 = (__start0, __temp0, __end0);
4206 __action21(
4207 input,
4208 __temp0,
4209 __0,
4210 )
4211 }
4212
4213 #[allow(unused_variables)]
4214 fn __action56<
4215 'input,
4216 >(
4217 input: &'input str,
4218 __0: (usize, ::std::vec::Vec<Expr>, usize),
4219 __1: (usize, ::std::option::Option<Expr>, usize),
4220 ) -> Vec<Expr>
4221 {
4222 let __start0 = __0.0.clone();
4223 let __end0 = __0.2.clone();
4224 let __temp0 = __action38(
4225 input,
4226 __0,
4227 );
4228 let __temp0 = (__start0, __temp0, __end0);
4229 __action21(
4230 input,
4231 __temp0,
4232 __1,
4233 )
4234 }
4235
4236 #[allow(unused_variables)]
4237 fn __action57<
4238 'input,
4239 >(
4240 input: &'input str,
4241 __0: (usize, Field<Expr>, usize),
4242 __1: (usize, &'input str, usize),
4243 ) -> ::std::vec::Vec<Field<Expr>>
4244 {
4245 let __start0 = __0.0.clone();
4246 let __end0 = __1.2.clone();
4247 let __temp0 = __action44(
4248 input,
4249 __0,
4250 __1,
4251 );
4252 let __temp0 = (__start0, __temp0, __end0);
4253 __action45(
4254 input,
4255 __temp0,
4256 )
4257 }
4258
4259 #[allow(unused_variables)]
4260 fn __action58<
4261 'input,
4262 >(
4263 input: &'input str,
4264 __0: (usize, ::std::vec::Vec<Field<Expr>>, usize),
4265 __1: (usize, Field<Expr>, usize),
4266 __2: (usize, &'input str, usize),
4267 ) -> ::std::vec::Vec<Field<Expr>>
4268 {
4269 let __start0 = __1.0.clone();
4270 let __end0 = __2.2.clone();
4271 let __temp0 = __action44(
4272 input,
4273 __1,
4274 __2,
4275 );
4276 let __temp0 = (__start0, __temp0, __end0);
4277 __action46(
4278 input,
4279 __0,
4280 __temp0,
4281 )
4282 }
4283
4284 #[allow(unused_variables)]
4285 fn __action59<
4286 'input,
4287 >(
4288 input: &'input str,
4289 __0: (usize, ::std::option::Option<Field<Expr>>, usize),
4290 ) -> Vec<Field<Expr>>
4291 {
4292 let __start0 = __0.0.clone();
4293 let __end0 = __0.0.clone();
4294 let __temp0 = __action42(
4295 input,
4296 &__start0,
4297 &__end0,
4298 );
4299 let __temp0 = (__start0, __temp0, __end0);
4300 __action19(
4301 input,
4302 __temp0,
4303 __0,
4304 )
4305 }
4306
4307 #[allow(unused_variables)]
4308 fn __action60<
4309 'input,
4310 >(
4311 input: &'input str,
4312 __0: (usize, ::std::vec::Vec<Field<Expr>>, usize),
4313 __1: (usize, ::std::option::Option<Field<Expr>>, usize),
4314 ) -> Vec<Field<Expr>>
4315 {
4316 let __start0 = __0.0.clone();
4317 let __end0 = __0.2.clone();
4318 let __temp0 = __action43(
4319 input,
4320 __0,
4321 );
4322 let __temp0 = (__start0, __temp0, __end0);
4323 __action19(
4324 input,
4325 __temp0,
4326 __1,
4327 )
4328 }
4329
4330 #[allow(unused_variables)]
4331 fn __action61<
4332 'input,
4333 >(
4334 input: &'input str,
4335 __0: (usize, Field<Type>, usize),
4336 __1: (usize, &'input str, usize),
4337 ) -> ::std::vec::Vec<Field<Type>>
4338 {
4339 let __start0 = __0.0.clone();
4340 let __end0 = __1.2.clone();
4341 let __temp0 = __action34(
4342 input,
4343 __0,
4344 __1,
4345 );
4346 let __temp0 = (__start0, __temp0, __end0);
4347 __action49(
4348 input,
4349 __temp0,
4350 )
4351 }
4352
4353 #[allow(unused_variables)]
4354 fn __action62<
4355 'input,
4356 >(
4357 input: &'input str,
4358 __0: (usize, ::std::vec::Vec<Field<Type>>, usize),
4359 __1: (usize, Field<Type>, usize),
4360 __2: (usize, &'input str, usize),
4361 ) -> ::std::vec::Vec<Field<Type>>
4362 {
4363 let __start0 = __1.0.clone();
4364 let __end0 = __2.2.clone();
4365 let __temp0 = __action34(
4366 input,
4367 __1,
4368 __2,
4369 );
4370 let __temp0 = (__start0, __temp0, __end0);
4371 __action50(
4372 input,
4373 __0,
4374 __temp0,
4375 )
4376 }
4377
4378 #[allow(unused_variables)]
4379 fn __action63<
4380 'input,
4381 >(
4382 input: &'input str,
4383 __0: (usize, ::std::option::Option<Field<Type>>, usize),
4384 ) -> Vec<Field<Type>>
4385 {
4386 let __start0 = __0.0.clone();
4387 let __end0 = __0.0.clone();
4388 let __temp0 = __action32(
4389 input,
4390 &__start0,
4391 &__end0,
4392 );
4393 let __temp0 = (__start0, __temp0, __end0);
4394 __action22(
4395 input,
4396 __temp0,
4397 __0,
4398 )
4399 }
4400
4401 #[allow(unused_variables)]
4402 fn __action64<
4403 'input,
4404 >(
4405 input: &'input str,
4406 __0: (usize, ::std::vec::Vec<Field<Type>>, usize),
4407 __1: (usize, ::std::option::Option<Field<Type>>, usize),
4408 ) -> Vec<Field<Type>>
4409 {
4410 let __start0 = __0.0.clone();
4411 let __end0 = __0.2.clone();
4412 let __temp0 = __action33(
4413 input,
4414 __0,
4415 );
4416 let __temp0 = (__start0, __temp0, __end0);
4417 __action22(
4418 input,
4419 __temp0,
4420 __1,
4421 )
4422 }
4423
4424 #[allow(unused_variables)]
4425 fn __action65<
4426 'input,
4427 >(
4428 input: &'input str,
4429 __0: (usize, Type, usize),
4430 __1: (usize, &'input str, usize),
4431 ) -> ::std::vec::Vec<Type>
4432 {
4433 let __start0 = __0.0.clone();
4434 let __end0 = __1.2.clone();
4435 let __temp0 = __action29(
4436 input,
4437 __0,
4438 __1,
4439 );
4440 let __temp0 = (__start0, __temp0, __end0);
4441 __action51(
4442 input,
4443 __temp0,
4444 )
4445 }
4446
4447 #[allow(unused_variables)]
4448 fn __action66<
4449 'input,
4450 >(
4451 input: &'input str,
4452 __0: (usize, ::std::vec::Vec<Type>, usize),
4453 __1: (usize, Type, usize),
4454 __2: (usize, &'input str, usize),
4455 ) -> ::std::vec::Vec<Type>
4456 {
4457 let __start0 = __1.0.clone();
4458 let __end0 = __2.2.clone();
4459 let __temp0 = __action29(
4460 input,
4461 __1,
4462 __2,
4463 );
4464 let __temp0 = (__start0, __temp0, __end0);
4465 __action52(
4466 input,
4467 __0,
4468 __temp0,
4469 )
4470 }
4471
4472 #[allow(unused_variables)]
4473 fn __action67<
4474 'input,
4475 >(
4476 input: &'input str,
4477 __0: (usize, ::std::option::Option<Type>, usize),
4478 ) -> Vec<Type>
4479 {
4480 let __start0 = __0.0.clone();
4481 let __end0 = __0.0.clone();
4482 let __temp0 = __action27(
4483 input,
4484 &__start0,
4485 &__end0,
4486 );
4487 let __temp0 = (__start0, __temp0, __end0);
4488 __action24(
4489 input,
4490 __temp0,
4491 __0,
4492 )
4493 }
4494
4495 #[allow(unused_variables)]
4496 fn __action68<
4497 'input,
4498 >(
4499 input: &'input str,
4500 __0: (usize, ::std::vec::Vec<Type>, usize),
4501 __1: (usize, ::std::option::Option<Type>, usize),
4502 ) -> Vec<Type>
4503 {
4504 let __start0 = __0.0.clone();
4505 let __end0 = __0.2.clone();
4506 let __temp0 = __action28(
4507 input,
4508 __0,
4509 );
4510 let __temp0 = (__start0, __temp0, __end0);
4511 __action24(
4512 input,
4513 __temp0,
4514 __1,
4515 )
4516 }
4517
4518 #[allow(unused_variables)]
4519 fn __action69<
4520 'input,
4521 >(
4522 input: &'input str,
4523 __0: (usize, Expr, usize),
4524 ) -> Vec<Expr>
4525 {
4526 let __start0 = __0.0.clone();
4527 let __end0 = __0.2.clone();
4528 let __temp0 = __action35(
4529 input,
4530 __0,
4531 );
4532 let __temp0 = (__start0, __temp0, __end0);
4533 __action55(
4534 input,
4535 __temp0,
4536 )
4537 }
4538
4539 #[allow(unused_variables)]
4540 fn __action70<
4541 'input,
4542 >(
4543 input: &'input str,
4544 __lookbehind: &usize,
4545 __lookahead: &usize,
4546 ) -> Vec<Expr>
4547 {
4548 let __start0 = __lookbehind.clone();
4549 let __end0 = __lookahead.clone();
4550 let __temp0 = __action36(
4551 input,
4552 &__start0,
4553 &__end0,
4554 );
4555 let __temp0 = (__start0, __temp0, __end0);
4556 __action55(
4557 input,
4558 __temp0,
4559 )
4560 }
4561
4562 #[allow(unused_variables)]
4563 fn __action71<
4564 'input,
4565 >(
4566 input: &'input str,
4567 __0: (usize, ::std::vec::Vec<Expr>, usize),
4568 __1: (usize, Expr, usize),
4569 ) -> Vec<Expr>
4570 {
4571 let __start0 = __1.0.clone();
4572 let __end0 = __1.2.clone();
4573 let __temp0 = __action35(
4574 input,
4575 __1,
4576 );
4577 let __temp0 = (__start0, __temp0, __end0);
4578 __action56(
4579 input,
4580 __0,
4581 __temp0,
4582 )
4583 }
4584
4585 #[allow(unused_variables)]
4586 fn __action72<
4587 'input,
4588 >(
4589 input: &'input str,
4590 __0: (usize, ::std::vec::Vec<Expr>, usize),
4591 ) -> Vec<Expr>
4592 {
4593 let __start0 = __0.2.clone();
4594 let __end0 = __0.2.clone();
4595 let __temp0 = __action36(
4596 input,
4597 &__start0,
4598 &__end0,
4599 );
4600 let __temp0 = (__start0, __temp0, __end0);
4601 __action56(
4602 input,
4603 __0,
4604 __temp0,
4605 )
4606 }
4607
4608 #[allow(unused_variables)]
4609 fn __action73<
4610 'input,
4611 >(
4612 input: &'input str,
4613 __0: (usize, Field<Expr>, usize),
4614 ) -> Vec<Field<Expr>>
4615 {
4616 let __start0 = __0.0.clone();
4617 let __end0 = __0.2.clone();
4618 let __temp0 = __action40(
4619 input,
4620 __0,
4621 );
4622 let __temp0 = (__start0, __temp0, __end0);
4623 __action59(
4624 input,
4625 __temp0,
4626 )
4627 }
4628
4629 #[allow(unused_variables)]
4630 fn __action74<
4631 'input,
4632 >(
4633 input: &'input str,
4634 __lookbehind: &usize,
4635 __lookahead: &usize,
4636 ) -> Vec<Field<Expr>>
4637 {
4638 let __start0 = __lookbehind.clone();
4639 let __end0 = __lookahead.clone();
4640 let __temp0 = __action41(
4641 input,
4642 &__start0,
4643 &__end0,
4644 );
4645 let __temp0 = (__start0, __temp0, __end0);
4646 __action59(
4647 input,
4648 __temp0,
4649 )
4650 }
4651
4652 #[allow(unused_variables)]
4653 fn __action75<
4654 'input,
4655 >(
4656 input: &'input str,
4657 __0: (usize, ::std::vec::Vec<Field<Expr>>, usize),
4658 __1: (usize, Field<Expr>, usize),
4659 ) -> Vec<Field<Expr>>
4660 {
4661 let __start0 = __1.0.clone();
4662 let __end0 = __1.2.clone();
4663 let __temp0 = __action40(
4664 input,
4665 __1,
4666 );
4667 let __temp0 = (__start0, __temp0, __end0);
4668 __action60(
4669 input,
4670 __0,
4671 __temp0,
4672 )
4673 }
4674
4675 #[allow(unused_variables)]
4676 fn __action76<
4677 'input,
4678 >(
4679 input: &'input str,
4680 __0: (usize, ::std::vec::Vec<Field<Expr>>, usize),
4681 ) -> Vec<Field<Expr>>
4682 {
4683 let __start0 = __0.2.clone();
4684 let __end0 = __0.2.clone();
4685 let __temp0 = __action41(
4686 input,
4687 &__start0,
4688 &__end0,
4689 );
4690 let __temp0 = (__start0, __temp0, __end0);
4691 __action60(
4692 input,
4693 __0,
4694 __temp0,
4695 )
4696 }
4697
4698 #[allow(unused_variables)]
4699 fn __action77<
4700 'input,
4701 >(
4702 input: &'input str,
4703 __0: (usize, Field<Type>, usize),
4704 ) -> Vec<Field<Type>>
4705 {
4706 let __start0 = __0.0.clone();
4707 let __end0 = __0.2.clone();
4708 let __temp0 = __action30(
4709 input,
4710 __0,
4711 );
4712 let __temp0 = (__start0, __temp0, __end0);
4713 __action63(
4714 input,
4715 __temp0,
4716 )
4717 }
4718
4719 #[allow(unused_variables)]
4720 fn __action78<
4721 'input,
4722 >(
4723 input: &'input str,
4724 __lookbehind: &usize,
4725 __lookahead: &usize,
4726 ) -> Vec<Field<Type>>
4727 {
4728 let __start0 = __lookbehind.clone();
4729 let __end0 = __lookahead.clone();
4730 let __temp0 = __action31(
4731 input,
4732 &__start0,
4733 &__end0,
4734 );
4735 let __temp0 = (__start0, __temp0, __end0);
4736 __action63(
4737 input,
4738 __temp0,
4739 )
4740 }
4741
4742 #[allow(unused_variables)]
4743 fn __action79<
4744 'input,
4745 >(
4746 input: &'input str,
4747 __0: (usize, ::std::vec::Vec<Field<Type>>, usize),
4748 __1: (usize, Field<Type>, usize),
4749 ) -> Vec<Field<Type>>
4750 {
4751 let __start0 = __1.0.clone();
4752 let __end0 = __1.2.clone();
4753 let __temp0 = __action30(
4754 input,
4755 __1,
4756 );
4757 let __temp0 = (__start0, __temp0, __end0);
4758 __action64(
4759 input,
4760 __0,
4761 __temp0,
4762 )
4763 }
4764
4765 #[allow(unused_variables)]
4766 fn __action80<
4767 'input,
4768 >(
4769 input: &'input str,
4770 __0: (usize, ::std::vec::Vec<Field<Type>>, usize),
4771 ) -> Vec<Field<Type>>
4772 {
4773 let __start0 = __0.2.clone();
4774 let __end0 = __0.2.clone();
4775 let __temp0 = __action31(
4776 input,
4777 &__start0,
4778 &__end0,
4779 );
4780 let __temp0 = (__start0, __temp0, __end0);
4781 __action64(
4782 input,
4783 __0,
4784 __temp0,
4785 )
4786 }
4787
4788 #[allow(unused_variables)]
4789 fn __action81<
4790 'input,
4791 >(
4792 input: &'input str,
4793 __0: (usize, Type, usize),
4794 ) -> Vec<Type>
4795 {
4796 let __start0 = __0.0.clone();
4797 let __end0 = __0.2.clone();
4798 let __temp0 = __action25(
4799 input,
4800 __0,
4801 );
4802 let __temp0 = (__start0, __temp0, __end0);
4803 __action67(
4804 input,
4805 __temp0,
4806 )
4807 }
4808
4809 #[allow(unused_variables)]
4810 fn __action82<
4811 'input,
4812 >(
4813 input: &'input str,
4814 __lookbehind: &usize,
4815 __lookahead: &usize,
4816 ) -> Vec<Type>
4817 {
4818 let __start0 = __lookbehind.clone();
4819 let __end0 = __lookahead.clone();
4820 let __temp0 = __action26(
4821 input,
4822 &__start0,
4823 &__end0,
4824 );
4825 let __temp0 = (__start0, __temp0, __end0);
4826 __action67(
4827 input,
4828 __temp0,
4829 )
4830 }
4831
4832 #[allow(unused_variables)]
4833 fn __action83<
4834 'input,
4835 >(
4836 input: &'input str,
4837 __0: (usize, ::std::vec::Vec<Type>, usize),
4838 __1: (usize, Type, usize),
4839 ) -> Vec<Type>
4840 {
4841 let __start0 = __1.0.clone();
4842 let __end0 = __1.2.clone();
4843 let __temp0 = __action25(
4844 input,
4845 __1,
4846 );
4847 let __temp0 = (__start0, __temp0, __end0);
4848 __action68(
4849 input,
4850 __0,
4851 __temp0,
4852 )
4853 }
4854
4855 #[allow(unused_variables)]
4856 fn __action84<
4857 'input,
4858 >(
4859 input: &'input str,
4860 __0: (usize, ::std::vec::Vec<Type>, usize),
4861 ) -> Vec<Type>
4862 {
4863 let __start0 = __0.2.clone();
4864 let __end0 = __0.2.clone();
4865 let __temp0 = __action26(
4866 input,
4867 &__start0,
4868 &__end0,
4869 );
4870 let __temp0 = (__start0, __temp0, __end0);
4871 __action68(
4872 input,
4873 __0,
4874 __temp0,
4875 )
4876 }
4877
4878 pub trait __ToTriple<'input, > {
4879 type Error;
4880 fn to_triple(value: Self) -> Result<(usize,(usize, &'input str),usize),Self::Error>;
4881 }
4882
4883 impl<'input, > __ToTriple<'input, > for (usize, (usize, &'input str), usize) {
4884 type Error = ();
4885 fn to_triple(value: Self) -> Result<(usize,(usize, &'input str),usize),()> {
4886 Ok(value)
4887 }
4888 }
4889 impl<'input, > __ToTriple<'input, > for Result<(usize, (usize, &'input str), usize),()> {
4890 type Error = ();
4891 fn to_triple(value: Self) -> Result<(usize,(usize, &'input str),usize),()> {
4892 value
4893 }
4894 }
1 mod ast;
2 pub mod grammar;
3
4 #[cfg(test)]
5 mod tests {
6 use ::grammar::*;
7 use ::ast::*;
8
9 fn test_parse(input: &str, expected: TopLevel) {
10 match parse_TopLevel(input) {
11 Ok(actual) =>
12 assert!(expected == actual,
13 "expected = {:?}, actual = {:?}",
14 expected, actual),
15 Err(msg) => panic!("Unable to parse {:?}: {:?}",
16 input, msg),
17 }
18 }
19
20 #[test]
21 fn empty_tuple_decl() {
22 test_parse(
23 "table foo().",
24 TopLevel::TableDecl(Clause {
25 name: "foo".to_string(),
26 data: ClauseData::TupleClause(vec![])
27 }));
28 }
29
30 #[test]
31 fn empty_record_decl() {
32 test_parse(
33 "table foo{}.",
34 TopLevel::TableDecl(Clause {
35 name: "foo".to_string(),
36 data: ClauseData::RecordClause(vec![])
37 }));
38 }
39
40 #[test]
41 fn tuple_parent_decl() {
42 test_parse(
43 "table parent(atom, atom).",
44 TopLevel::TableDecl(Clause {
45 name: "parent".to_string(),
46 data: ClauseData::TupleClause(vec![
47 Type::AtomType,
48 Type::AtomType,
49 ])
50 }));
51 }
52
53 #[test]
54 fn record_parent_decl() {
55 test_parse(
56 "table parent { parent: atom, child: atom }.",
57 TopLevel::TableDecl(Clause {
58 name: "parent".to_string(),
59 data: ClauseData::RecordClause(vec![
60 Field { name: "parent".to_string(),
61 value: Type::AtomType },
62 Field { name: "child".to_string(),
63 value: Type::AtomType },
64 ])
65 }));
66 }
67
68 #[test]
69 fn insert_tuple_row() {
70 test_parse(
71 "insert parent (foo, bar).",
72 TopLevel::RowDecl(Clause {
73 name: "parent".to_string(),
74 data: ClauseData::TupleClause(vec![
75 Expr::Atom("foo".to_string()),
76 Expr::Atom("bar".to_string()),
77 ])
78 }));
79 }
80
81 #[test]
82 fn insert_record_row() {
83 test_parse(
84 "insert parent { parent: foo, child: bar }.",
85 TopLevel::RowDecl(Clause {
86 name: "parent".to_string(),
87 data: ClauseData::RecordClause(vec![
88 Field { name: "parent".to_string(),
89 value: Expr::Atom("foo".to_string())},
90 Field { name: "child".to_string(),
91 value: Expr::Atom("bar".to_string())},
92 ])
93 }));
94 }
95
96 }