From ddcbe1b3160a7289f49e6628cf690a1238a74ff2 Mon Sep 17 00:00:00 2001 From: Pakin Date: Mon, 25 May 2026 14:19:30 +0700 Subject: [PATCH] fix: dot & index in var Signed-off-by: Pakin --- src/xml/ast/nodes.rs | 11 + src/xml/codegen/mod.rs | 12 + src/xml/parser/grammar.lalrpop | 40 + src/xml/parser/grammar.rs | 1956 ++++++++++++++++++-------------- src/xml/parser/mod.rs | 155 ++- src/xml/parser/preprocess.rs | 249 +++- src/xml/vm/mod.rs | 34 + 7 files changed, 1623 insertions(+), 834 deletions(-) diff --git a/src/xml/ast/nodes.rs b/src/xml/ast/nodes.rs index 8185192..36ea1fe 100644 --- a/src/xml/ast/nodes.rs +++ b/src/xml/ast/nodes.rs @@ -10,6 +10,17 @@ pub enum Statement { value: Option, assignment_type: AssignmentType, }, + VarDotAssign { + object: String, + property: String, + value: Expression, + }, + VarIndexAssign { + name: String, + indices: Vec, + value: Expression, + assignment_type: AssignmentType, + }, IfStmt { condition: Expression, then_branch: Vec, diff --git a/src/xml/codegen/mod.rs b/src/xml/codegen/mod.rs index 8439c8e..9363249 100644 --- a/src/xml/codegen/mod.rs +++ b/src/xml/codegen/mod.rs @@ -93,5 +93,17 @@ fn walk_statement(codegen: &dyn CodeGen, stmt: &Statement) -> String { let rendered_args: Vec = args.iter().map(|a| codegen.generate_expression(a)).collect(); codegen.generate_call(name, &rendered_args) } + Statement::VarDotAssign { object, property, value } => { + let v = codegen.generate_expression(value); + codegen.generate_var_decl(&format!("{}.{}", object, property), Some(&v), AssignmentType::Equals) + } + Statement::VarIndexAssign { name, indices, value, assignment_type } => { + let v = codegen.generate_expression(value); + let idx_str: String = indices.iter().map(|i| format!("[{}]", codegen.generate_expression(i))).collect(); + match assignment_type { + AssignmentType::Equals => codegen.generate_var_decl(&format!("{}{}", name, idx_str), Some(&v), AssignmentType::Equals), + AssignmentType::NotAssigned => codegen.generate_var_decl(&format!("{}{}", name, idx_str), Some(&v), AssignmentType::NotAssigned), + } + } } } \ No newline at end of file diff --git a/src/xml/parser/grammar.lalrpop b/src/xml/parser/grammar.lalrpop index 28109a9..9e25f75 100644 --- a/src/xml/parser/grammar.lalrpop +++ b/src/xml/parser/grammar.lalrpop @@ -7,11 +7,44 @@ pub Program: Program = { }; Stmt: Statement = { + "Var" "." "=" => Statement::VarDotAssign { + object: name, + property: prop, + value: v, + }, + "Var" "#" "." "=" => Statement::VarDotAssign { + object: s, + property: prop, + value: v, + }, + "Var" "[" "]" "=" => Statement::VarIndexAssign { + name, + indices: vec![idx], + value: v, + assignment_type: AssignmentType::Equals, + }, + "Var" "[" "]" "[" "]" "=" => Statement::VarIndexAssign { + name, + indices: vec![idx, idx2], + value: v, + assignment_type: AssignmentType::Equals, + }, + "Var" "[" "]" "!" "assigned" => Statement::VarIndexAssign { + name, + indices: vec![idx], + value: v, + assignment_type: AssignmentType::NotAssigned, + }, "Var" "=" => Statement::VarDecl { name, value: Some(v), assignment_type: AssignmentType::Equals, }, + "Var" "#" "=" => Statement::VarDecl { + name: s, + value: Some(v), + assignment_type: AssignmentType::Equals, + }, "Var" "!" "assigned" => Statement::VarDecl { name, value: None, @@ -33,8 +66,11 @@ Stmt: Statement = { body, }, "DEBUGVAR" => Statement::DebugVar { name }, + "DEBUGVAR" "[" <_expr:Expr> "]" => Statement::DebugVar { name }, + "DEBUGVAR" "#" => Statement::DebugVar { name: s }, "Open" => Statement::Open { filename }, "(" ?> ")" => Statement::Call { name, args: args.unwrap_or_default() }, + "#" "(" ?> ")" => Statement::Call { name: s, args: args.unwrap_or_default() }, }; Expr: Expression = { @@ -93,6 +129,7 @@ AtomExpr: Expression = { "True" => Expression::Literal(LiteralValue::Bool(true)), "False" => Expression::Literal(LiteralValue::Bool(false)), "(" ?> ")" => Expression::FunctionCall { name, args: args.unwrap_or_default() }, + "#" => Expression::Identifier(s), "$" "." => Expression::AutoVarExpr { variable: Box::new(Expression::SpecialVar { name: format!("{}.{}", name, prop), is_negative: false }) }, "$" "." => Expression::AutoVarExpr { variable: Box::new(Expression::SpecialVar { name: format!("{}.{}", s, prop), is_negative: false }) }, "$" "-" "." => Expression::AutoVarExpr { variable: Box::new(Expression::SpecialVar { name: format!("{}.{}", name, prop), is_negative: true }) }, @@ -161,6 +198,7 @@ match { "!", "$", "@", + "#", "(", ")", ",", @@ -172,6 +210,8 @@ match { ">", ".", "=", + "[", + "]", } else { r"[a-zA-Z_][a-zA-Z0-9_#]*", } \ No newline at end of file diff --git a/src/xml/parser/grammar.rs b/src/xml/parser/grammar.rs index d3400ef..d2fc313 100644 --- a/src/xml/parser/grammar.rs +++ b/src/xml/parser/grammar.rs @@ -1,5 +1,5 @@ // auto-generated: "lalrpop 0.23.1" -// sha3: 840d07d92ee806713dd1db26116df6bb77734b103d8c00a22beecaf2761a446f +// sha3: 622c67d75e04c1bab6bda13925c6fe2f92491f98e79b7f310a9d9c4125c5ff3e use crate::xml::ast::nodes::{AssignmentType, BinaryOpKind, Expression, LiteralValue, Program, Statement, UnaryOpKind}; #[allow(unused_extern_crates)] extern crate lalrpop_util as __lalrpop_util; @@ -35,234 +35,268 @@ mod __parse__Program { Variant9(alloc::vec::Vec), Variant10(Vec), } - const __ACTION: &[i8] = &[ + const __ACTION: &[i16] = &[ // State 0 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 1 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 2 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 3 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 4 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 5 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, // State 6 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 7 - 44, 9, 0, 10, 0, 11, 67, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 74, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 8 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 9 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, // State 10 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 11 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 12 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, // State 13 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 14 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 15 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 16 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 17 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 18 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 19 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 20 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 21 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 22 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 23 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 24 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -66, 0, -66, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -70, 0, -70, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 25 - 44, 9, 0, 10, 0, 11, 90, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 97, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 26 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 27 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 28 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 29 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 68, 0, 0, // State 30 - 44, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 60, 0, 0, 61, 62, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 31 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, -66, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 32 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -67, -67, -67, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 33 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, -70, 0, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 34 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, -71, -71, -71, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 35 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 36 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 37 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -66, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 38 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 39 - 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, -70, 0, 4, 5, 0, 6, 0, 0, 7, 0, 0, 0, 0, // State 40 - 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 41 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 51, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 42 - -64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -64, -64, -64, -64, 0, -64, -64, 0, -64, 0, 0, -64, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 43 - -43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, -43, -43, -43, -43, 0, -43, -43, -43, -43, -43, 0, -43, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 44 - -65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -65, -65, -65, -65, 0, -65, -65, 0, -65, 0, 0, -65, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 45 - -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, -58, -58, -58, 0, -58, -58, 0, -58, 0, 0, -58, 0, 0, 0, 0, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 46 - 0, 0, 0, 0, 0, 0, 0, 0, 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, + 51, 9, 0, 10, 0, 11, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 66, 0, 0, 0, 0, 0, 67, 0, 0, 68, 69, 0, // State 47 - -31, 0, -31, 0, -31, 0, -31, 0, 16, -31, 17, 0, 0, -31, -31, -31, -31, -31, 0, -31, -31, -31, -31, -31, 0, -31, -31, 0, -31, -31, 0, -31, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 48 - -48, 0, 0, 0, 18, 0, -48, 0, 0, -48, 0, 0, 0, 0, 0, 0, 0, 0, 0, -48, -48, -48, -48, -48, 0, -48, -48, 0, -48, -48, 0, -48, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 49 - -68, 0, -68, 0, -68, 0, -68, -68, -68, -68, -68, 0, -68, -68, -68, -68, -68, -68, 0, -68, -68, -68, -68, -68, 0, -68, -68, 0, -68, -68, 0, -68, 0, 0, 0, 0, + -68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -68, -68, -68, -68, 0, -68, -68, 0, -68, 0, 0, -68, 0, 0, 0, 0, // State 50 - -9, 0, 19, 0, -9, 0, -9, 0, 0, -9, 0, 0, 0, 20, 21, 22, 23, 24, 0, -9, -9, -9, -9, -9, 0, -9, -9, 0, -9, -9, 0, -9, 0, 0, 0, 0, + -43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, -43, 0, -43, -43, -43, -43, -43, -43, -43, 0, -43, -43, -43, -43, -43, 0, -43, 0, 0, 0, 0, // State 51 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, + -69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -69, -69, -69, -69, 0, -69, -69, 0, -69, 0, 0, -69, 0, 0, 0, 0, // State 52 - -29, 0, -29, 0, -29, 26, -29, -29, -29, -29, -29, 0, -29, -29, -29, -29, -29, -29, 0, -29, -29, -29, -29, -29, 0, -29, -29, 0, -29, -29, 0, -29, 0, 0, 0, 0, + -62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -62, -62, -62, -62, 0, -62, -62, 0, -62, 0, 0, -62, 0, 0, 0, 0, // State 53 - -6, 0, -6, 0, -6, 0, -6, 27, -6, -6, -6, 0, 28, -6, -6, -6, -6, -6, 0, -6, -6, -6, -6, -6, 0, -6, -6, 0, -6, -6, 0, -6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, // State 54 - -12, 0, -12, 0, -12, 0, -12, -12, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, 0, -12, -12, -12, -12, -12, 0, -12, -12, 0, -12, -12, 0, -12, 0, 0, 0, 0, + -31, 0, -31, 0, -31, 0, -31, 0, 16, -31, 17, 0, 0, -31, -31, -31, -31, -31, 0, 0, -31, -31, -31, -31, -31, -31, 0, -31, -31, 0, -31, -31, 0, -31, 0, 0, 0, 0, // State 55 - -42, 0, 0, 0, 0, 0, -42, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, -42, -42, -42, -42, 0, -42, -42, 0, -42, -42, 0, -42, 0, 0, 0, 0, + -48, 0, 0, 0, 18, 0, -48, 0, 0, -48, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -48, -48, -48, -48, -48, -48, 0, -48, -48, 0, -48, -48, 0, -48, 0, 0, 0, 0, // State 56 - -11, 0, -11, 0, -11, 0, -11, -11, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, 0, -11, -11, -11, -11, -11, 0, -11, -11, 0, -11, -11, 0, -11, 0, 0, 0, 0, + -72, 0, -72, 0, -72, 0, -72, -72, -72, -72, -72, 0, -72, -72, -72, -72, -72, -72, 0, 0, -72, -72, -72, -72, -72, -72, 0, -72, -72, 0, -72, -72, 0, -72, 0, 0, 0, 0, // State 57 - -44, 0, -44, 0, -44, 0, -44, -44, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, 0, -44, -44, -44, -44, -44, 0, -44, -44, 0, -44, -44, 0, -44, 0, 0, 0, 0, + -9, 0, 19, 0, -9, 0, -9, 0, 0, -9, 0, 0, 0, 20, 21, 22, 23, 24, 0, 0, -9, -9, -9, -9, -9, -9, 0, -9, -9, 0, -9, -9, 0, -9, 0, 0, 0, 0, // State 58 - -14, 0, -14, 0, -14, 0, -14, -14, -14, -14, -14, 0, -14, -14, -14, -14, -14, -14, 0, -14, -14, -14, -14, -14, 0, -14, -14, 0, -14, -14, 0, -14, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0, 0, 0, 0, // State 59 - -13, 0, -13, 0, -13, 0, -13, -13, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, 0, -13, -13, -13, -13, -13, 0, -13, -13, 0, -13, -13, 0, -13, 0, 0, 0, 0, + -29, 0, -29, 0, -29, 26, -29, -29, -29, -29, -29, 0, -29, -29, -29, -29, -29, -29, 0, 0, -29, -29, -29, -29, -29, -29, 0, -29, -29, 0, -29, -29, 0, -29, 0, 0, 0, 0, // State 60 - -52, 0, -52, 0, -52, 0, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, -52, -52, -52, -52, -52, 0, -52, -52, 0, -52, -52, 0, -52, 0, 0, 0, 0, + -6, 0, -6, 0, -6, 0, -6, 27, -6, -6, -6, 0, 28, -6, -6, -6, -6, -6, 0, 0, -6, -6, -6, -6, -6, -6, 0, -6, -6, 0, -6, -6, 0, -6, 0, 0, 0, 0, // State 61 - -47, 0, -47, 0, -47, 0, -47, -47, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, 0, -47, -47, -47, -47, -47, 0, -47, -47, 0, -47, -47, 0, -47, 0, 0, 0, 0, + -12, 0, -12, 0, -12, 0, -12, -12, -12, -12, -12, 0, -12, -12, -12, -12, -12, -12, 0, 0, -12, -12, -12, -12, -12, -12, 0, -12, -12, 0, -12, -12, 0, -12, 0, 0, 0, 0, // State 62 - -59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -59, -59, -59, -59, 0, -59, -59, 0, -59, 0, 0, -59, 0, 0, 0, 0, + -42, 0, 0, 0, 0, 0, -42, 0, 0, -42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -42, 29, -42, -42, -42, -42, 0, -42, -42, 0, -42, -42, 0, -42, 0, 0, 0, 0, // State 63 - 0, 75, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -11, 0, -11, 0, -11, 0, -11, -11, -11, -11, -11, 0, -11, -11, -11, -11, -11, -11, 0, 0, -11, -11, -11, -11, -11, -11, 0, -11, -11, 0, -11, -11, 0, -11, 0, 0, 0, 0, // State 64 - 0, 0, 0, 0, 0, 0, 77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -44, 0, -44, 0, -44, 0, -44, -44, -44, -44, -44, 0, -44, -44, -44, -44, -44, -44, 0, 0, -44, -44, -44, -44, -44, -44, 0, -44, -44, 0, -44, -44, 0, -44, 0, 0, 0, 0, // State 65 - 0, 0, 0, 0, 0, 0, -38, 0, 0, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -14, 0, -14, 0, -14, 0, -14, -14, -14, -14, -14, 0, -14, -14, -14, -14, -14, -14, 0, 0, -14, -14, -14, -14, -14, -14, 0, -14, -14, 0, -14, -14, 0, -14, 0, 0, 0, 0, // State 66 - -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -61, -61, -61, -61, 0, -61, -61, 0, -61, 0, 0, -61, 0, 0, 0, 0, + -13, 0, -13, 0, -13, 0, -13, -13, -13, -13, -13, 0, -13, -13, -13, -13, -13, -13, 0, 0, -13, -13, -13, -13, -13, -13, 0, -13, -13, 0, -13, -13, 0, -13, 0, 0, 0, 0, // State 67 - -69, 0, -69, 0, -69, 0, -69, -69, -69, -69, -69, 0, -69, -69, -69, -69, -69, -69, 0, -69, -69, -69, -69, -69, 0, -69, -69, 0, -69, -69, 0, -69, 0, 0, 0, 0, + -52, 0, -52, 0, -52, 0, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, -52, 0, 0, -52, -52, -52, -52, -52, -52, 0, -52, -52, 0, -52, -52, 0, -52, 0, 0, 0, 0, // State 68 - -21, 0, -21, 0, -21, 0, -21, -21, -21, -21, -21, 34, -21, -21, -21, -21, -21, -21, 0, -21, -21, -21, -21, -21, 0, -21, -21, 0, -21, -21, 0, -21, 0, 0, 0, 0, + -47, 0, -47, 0, -47, 0, -47, -47, -47, -47, -47, 0, -47, -47, -47, -47, -47, -47, 0, 0, -47, -47, -47, -47, -47, -47, 0, -47, -47, 0, -47, -47, 0, -47, 0, 0, 0, 0, // State 69 - -22, 0, -22, 0, -22, 0, -22, -22, -22, -22, -22, 35, -22, -22, -22, -22, -22, -22, 0, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, -22, 0, -22, 0, 0, 0, 0, + -63, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -63, -63, -63, -63, 0, -63, -63, 0, -63, 0, 0, -63, 0, 0, 0, 0, // State 70 - 0, 0, 0, 0, 0, 0, 96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 82, 0, 0, 0, 0, 0, 0, 0, 0, 0, 31, 0, 0, 0, 32, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 71 - -70, 0, -70, 0, -70, 0, -70, -70, -70, -70, -70, 0, -70, -70, -70, -70, -70, -70, 0, -70, -70, -70, -70, -70, 0, -70, -70, 0, -70, -70, 0, -70, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 84, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 72 - -25, 0, -25, 0, -25, 0, -25, -25, -25, -25, -25, 36, -25, -25, -25, -25, -25, -25, 0, -25, -25, -25, -25, -25, 0, -25, -25, 0, -25, -25, 0, -25, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -38, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 73 - -27, 0, -27, 0, -27, 0, -27, -27, -27, -27, -27, 37, -27, -27, -27, -27, -27, -27, 0, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, -27, 0, -27, 0, 0, 0, 0, + -65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -65, -65, -65, -65, 0, -65, -65, 0, -65, 0, 0, -65, 0, 0, 0, 0, // State 74 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, 0, 0, + -73, 0, -73, 0, -73, 0, -73, -73, -73, -73, -73, 0, -73, -73, -73, -73, -73, -73, 0, 0, -73, -73, -73, -73, -73, -73, 0, -73, -73, 0, -73, -73, 0, -73, 0, 0, 0, 0, // State 75 - 0, 0, 0, 0, 0, 0, -39, 0, 0, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -21, 0, -21, 0, -21, 0, -21, -21, -21, -21, -21, 36, -21, -21, -21, -21, -21, -21, 0, 0, -21, -21, -21, -21, -21, -21, 0, -21, -21, 0, -21, -21, 0, -21, 0, 0, 0, 0, // State 76 - -60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -60, -60, -60, -60, 0, -60, -60, 0, -60, 0, 0, -60, 0, 0, 0, 0, + -22, 0, -22, 0, -22, 0, -22, -22, -22, -22, -22, 37, -22, -22, -22, -22, -22, -22, 0, 0, -22, -22, -22, -22, -22, -22, 0, -22, -22, 0, -22, -22, 0, -22, 0, 0, 0, 0, // State 77 - -4, -4, 0, -4, 0, -4, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, -4, 0, 0, -4, -4, 0, + 0, 0, 0, 0, 0, 0, 103, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 78 - -7, 0, -7, 0, -7, 0, -7, 27, -7, -7, -7, 0, 28, -7, -7, -7, -7, -7, 0, -7, -7, -7, -7, -7, 0, -7, -7, 0, -7, -7, 0, -7, 0, 0, 0, 0, + -74, 0, -74, 0, -74, 0, -74, -74, -74, -74, -74, 0, -74, -74, -74, -74, -74, -74, 0, 0, -74, -74, -74, -74, -74, -74, 0, -74, -74, 0, -74, -74, 0, -74, 0, 0, 0, 0, // State 79 - -8, 0, -8, 0, -8, 0, -8, 27, -8, -8, -8, 0, 28, -8, -8, -8, -8, -8, 0, -8, -8, -8, -8, -8, 0, -8, -8, 0, -8, -8, 0, -8, 0, 0, 0, 0, + -25, 0, -25, 0, -25, 0, -25, -25, -25, -25, -25, 38, -25, -25, -25, -25, -25, -25, 0, 0, -25, -25, -25, -25, -25, -25, 0, -25, -25, 0, -25, -25, 0, -25, 0, 0, 0, 0, // State 80 - -10, 0, 19, 0, -10, 0, -10, 0, 0, -10, 0, 0, 0, 20, 21, 22, 23, 24, 0, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, 0, -10, 0, 0, 0, 0, + -27, 0, -27, 0, -27, 0, -27, -27, -27, -27, -27, 39, -27, -27, -27, -27, -27, -27, 0, 0, -27, -27, -27, -27, -27, -27, 0, -27, -27, 0, -27, -27, 0, -27, 0, 0, 0, 0, // State 81 - -33, 0, -33, 0, -33, 0, -33, 0, 16, -33, 17, 0, 0, -33, -33, -33, -33, -33, 0, -33, -33, -33, -33, -33, 0, -33, -33, 0, -33, -33, 0, -33, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 104, 0, 0, 0, // State 82 - -36, 0, -36, 0, -36, 0, -36, 0, 16, -36, 17, 0, 0, -36, -36, -36, -36, -36, 0, -36, -36, -36, -36, -36, 0, -36, -36, 0, -36, -36, 0, -36, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, -39, 0, 0, 108, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 83 - -34, 0, -34, 0, -34, 0, -34, 0, 16, -34, 17, 0, 0, -34, -34, -34, -34, -34, 0, -34, -34, -34, -34, -34, 0, -34, -34, 0, -34, -34, 0, -34, 0, 0, 0, 0, + -64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -64, -64, -64, -64, 0, -64, -64, 0, -64, 0, 0, -64, 0, 0, 0, 0, // State 84 - -32, 0, -32, 0, -32, 0, -32, 0, 16, -32, 17, 0, 0, -32, -32, -32, -32, -32, 0, -32, -32, -32, -32, -32, 0, -32, -32, 0, -32, -32, 0, -32, 0, 0, 0, 0, + -4, -4, 0, -4, 0, -4, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, 0, 0, -4, 0, 0, 0, 0, 0, -4, 0, 0, -4, -4, 0, // State 85 - -37, 0, -37, 0, -37, 0, -37, 0, 16, -37, 17, 0, 0, -37, -37, -37, -37, -37, 0, -37, -37, -37, -37, -37, 0, -37, -37, 0, -37, -37, 0, -37, 0, 0, 0, 0, + -7, 0, -7, 0, -7, 0, -7, 27, -7, -7, -7, 0, 28, -7, -7, -7, -7, -7, 0, 0, -7, -7, -7, -7, -7, -7, 0, -7, -7, 0, -7, -7, 0, -7, 0, 0, 0, 0, // State 86 - -35, 0, -35, 0, -35, 0, -35, 0, 16, -35, 17, 0, 0, -35, -35, -35, -35, -35, 0, -35, -35, -35, -35, -35, 0, -35, -35, 0, -35, -35, 0, -35, 0, 0, 0, 0, + -8, 0, -8, 0, -8, 0, -8, 27, -8, -8, -8, 0, 28, -8, -8, -8, -8, -8, 0, 0, -8, -8, -8, -8, -8, -8, 0, -8, -8, 0, -8, -8, 0, -8, 0, 0, 0, 0, // State 87 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 38, 0, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -10, 0, 19, 0, -10, 0, -10, 0, 0, -10, 0, 0, 0, 20, 21, 22, 23, 24, 0, 0, -10, -10, -10, -10, -10, -10, 0, -10, -10, 0, -10, -10, 0, -10, 0, 0, 0, 0, // State 88 - 0, 0, 0, 0, 0, 0, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -33, 0, -33, 0, -33, 0, -33, 0, 16, -33, 17, 0, 0, -33, -33, -33, -33, -33, 0, 0, -33, -33, -33, -33, -33, -33, 0, -33, -33, 0, -33, -33, 0, -33, 0, 0, 0, 0, // State 89 - -16, 0, -16, 0, -16, 0, -16, -16, -16, -16, -16, 0, -16, -16, -16, -16, -16, -16, 0, -16, -16, -16, -16, -16, 0, -16, -16, 0, -16, -16, 0, -16, 0, 0, 0, 0, + -36, 0, -36, 0, -36, 0, -36, 0, 16, -36, 17, 0, 0, -36, -36, -36, -36, -36, 0, 0, -36, -36, -36, -36, -36, -36, 0, -36, -36, 0, -36, -36, 0, -36, 0, 0, 0, 0, // State 90 - -45, 0, -45, 0, -45, 0, -45, -45, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, 0, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, -45, 0, -45, 0, 0, 0, 0, + -34, 0, -34, 0, -34, 0, -34, 0, 16, -34, 17, 0, 0, -34, -34, -34, -34, -34, 0, 0, -34, -34, -34, -34, -34, -34, 0, -34, -34, 0, -34, -34, 0, -34, 0, 0, 0, 0, // State 91 - -46, 0, -46, 0, -46, 0, -46, -46, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, 0, -46, -46, -46, -46, -46, 0, -46, -46, 0, -46, -46, 0, -46, 0, 0, 0, 0, + -32, 0, -32, 0, -32, 0, -32, 0, 16, -32, 17, 0, 0, -32, -32, -32, -32, -32, 0, 0, -32, -32, -32, -32, -32, -32, 0, -32, -32, 0, -32, -32, 0, -32, 0, 0, 0, 0, // State 92 - -49, 0, 0, 0, 18, 0, -49, 0, 0, -49, 0, 0, 0, 0, 0, 0, 0, 0, 0, -49, -49, -49, -49, -49, 0, -49, -49, 0, -49, -49, 0, -49, 0, 0, 0, 0, + -37, 0, -37, 0, -37, 0, -37, 0, 16, -37, 17, 0, 0, -37, -37, -37, -37, -37, 0, 0, -37, -37, -37, -37, -37, -37, 0, -37, -37, 0, -37, -37, 0, -37, 0, 0, 0, 0, // State 93 - -23, 0, -23, 0, -23, 0, -23, -23, -23, -23, -23, 39, -23, -23, -23, -23, -23, -23, 0, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, -23, 0, -23, 0, 0, 0, 0, + -35, 0, -35, 0, -35, 0, -35, 0, 16, -35, 17, 0, 0, -35, -35, -35, -35, -35, 0, 0, -35, -35, -35, -35, -35, -35, 0, -35, -35, 0, -35, -35, 0, -35, 0, 0, 0, 0, // State 94 - -24, 0, -24, 0, -24, 0, -24, -24, -24, -24, -24, 40, -24, -24, -24, -24, -24, -24, 0, -24, -24, -24, -24, -24, 0, -24, -24, 0, -24, -24, 0, -24, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 110, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 95 - -30, 0, -30, 0, -30, 0, -30, -30, -30, -30, -30, 0, -30, -30, -30, -30, -30, -30, 0, -30, -30, -30, -30, -30, 0, -30, -30, 0, -30, -30, 0, -30, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 96 - -54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -54, -54, -54, -54, 0, -54, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0, + -16, 0, -16, 0, -16, 0, -16, -16, -16, -16, -16, 0, -16, -16, -16, -16, -16, -16, 0, 0, -16, -16, -16, -16, -16, -16, 0, -16, -16, 0, -16, -16, 0, -16, 0, 0, 0, 0, // State 97 - -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -53, -53, -53, -53, 0, -53, -53, 0, -53, 0, 0, -53, 0, 0, 0, 0, + -45, 0, -45, 0, -45, 0, -45, -45, -45, -45, -45, 0, -45, -45, -45, -45, -45, -45, 0, 0, -45, -45, -45, -45, -45, -45, 0, -45, -45, 0, -45, -45, 0, -45, 0, 0, 0, 0, // State 98 - -5, -5, 0, -5, 0, -5, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, -5, 0, 0, -5, -5, 0, + -46, 0, -46, 0, -46, 0, -46, -46, -46, -46, -46, 0, -46, -46, -46, -46, -46, -46, 0, 0, -46, -46, -46, -46, -46, -46, 0, -46, -46, 0, -46, -46, 0, -46, 0, 0, 0, 0, // State 99 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -49, 0, 0, 0, 18, 0, -49, 0, 0, -49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -49, -49, -49, -49, -49, -49, 0, -49, -49, 0, -49, -49, 0, -49, 0, 0, 0, 0, // State 100 - -55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -55, -55, -55, -55, 0, -55, -55, 0, -55, 0, 0, -55, 0, 0, 0, 0, + -23, 0, -23, 0, -23, 0, -23, -23, -23, -23, -23, 41, -23, -23, -23, -23, -23, -23, 0, 0, -23, -23, -23, -23, -23, -23, 0, -23, -23, 0, -23, -23, 0, -23, 0, 0, 0, 0, // State 101 - -15, 0, -15, 0, -15, 0, -15, -15, -15, -15, -15, 0, -15, -15, -15, -15, -15, -15, 0, -15, -15, -15, -15, -15, 0, -15, -15, 0, -15, -15, 0, -15, 0, 0, 0, 0, + -24, 0, -24, 0, -24, 0, -24, -24, -24, -24, -24, 42, -24, -24, -24, -24, -24, -24, 0, 0, -24, -24, -24, -24, -24, -24, 0, -24, -24, 0, -24, -24, 0, -24, 0, 0, 0, 0, // State 102 - -17, 0, -17, 0, -17, 0, -17, -17, -17, -17, -17, 0, -17, -17, -17, -17, -17, -17, 0, -17, -17, -17, -17, -17, 0, -17, -17, 0, -17, -17, 0, -17, 0, 0, 0, 0, + -30, 0, -30, 0, -30, 0, -30, -30, -30, -30, -30, 0, -30, -30, -30, -30, -30, -30, 0, 0, -30, -30, -30, -30, -30, -30, 0, -30, -30, 0, -30, -30, 0, -30, 0, 0, 0, 0, // State 103 - -18, 0, -18, 0, -18, 0, -18, -18, -18, -18, -18, 0, -18, -18, -18, -18, -18, -18, 0, -18, -18, -18, -18, -18, 0, -18, -18, 0, -18, -18, 0, -18, 0, 0, 0, 0, + -58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -58, -58, -58, -58, 0, -58, -58, 0, -58, 0, 0, -58, 0, 0, 0, 0, // State 104 - -26, 0, -26, 0, -26, 0, -26, -26, -26, -26, -26, 0, -26, -26, -26, -26, -26, -26, 0, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, -26, 0, -26, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 105 - -28, 0, -28, 0, -28, 0, -28, -28, -28, -28, -28, 0, -28, -28, -28, -28, -28, -28, 0, -28, -28, -28, -28, -28, 0, -28, -28, 0, -28, -28, 0, -28, 0, 0, 0, 0, + -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -57, -57, -57, -57, 0, -57, -57, 0, -57, 0, 0, -57, 0, 0, 0, 0, // State 106 - -57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -57, -57, -57, -57, 0, -57, -57, 0, -57, 0, 0, -57, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 116, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 107 - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + -5, -5, 0, -5, 0, -5, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, 0, 0, -5, 0, 0, 0, 0, 0, -5, 0, 0, -5, -5, 0, // State 108 - -19, 0, -19, 0, -19, 0, -19, -19, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, 0, -19, -19, -19, -19, -19, 0, -19, -19, 0, -19, -19, 0, -19, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 117, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // State 109 - -20, 0, -20, 0, -20, 0, -20, -20, -20, -20, -20, 0, -20, -20, -20, -20, -20, -20, 0, -20, -20, -20, -20, -20, 0, -20, -20, 0, -20, -20, 0, -20, 0, 0, 0, 0, + -59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -59, -59, -59, -59, 0, -59, -59, 0, -59, 0, 0, -59, 0, 0, 0, 0, // State 110 - -56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -56, -56, -56, -56, 0, -56, -56, 0, -56, 0, 0, -56, 0, 0, 0, 0, + -15, 0, -15, 0, -15, 0, -15, -15, -15, -15, -15, 0, -15, -15, -15, -15, -15, -15, 0, 0, -15, -15, -15, -15, -15, -15, 0, -15, -15, 0, -15, -15, 0, -15, 0, 0, 0, 0, + // State 111 + -17, 0, -17, 0, -17, 0, -17, -17, -17, -17, -17, 0, -17, -17, -17, -17, -17, -17, 0, 0, -17, -17, -17, -17, -17, -17, 0, -17, -17, 0, -17, -17, 0, -17, 0, 0, 0, 0, + // State 112 + -18, 0, -18, 0, -18, 0, -18, -18, -18, -18, -18, 0, -18, -18, -18, -18, -18, -18, 0, 0, -18, -18, -18, -18, -18, -18, 0, -18, -18, 0, -18, -18, 0, -18, 0, 0, 0, 0, + // State 113 + -26, 0, -26, 0, -26, 0, -26, -26, -26, -26, -26, 0, -26, -26, -26, -26, -26, -26, 0, 0, -26, -26, -26, -26, -26, -26, 0, -26, -26, 0, -26, -26, 0, -26, 0, 0, 0, 0, + // State 114 + -28, 0, -28, 0, -28, 0, -28, -28, -28, -28, -28, 0, -28, -28, -28, -28, -28, -28, 0, 0, -28, -28, -28, -28, -28, -28, 0, -28, -28, 0, -28, -28, 0, -28, 0, 0, 0, 0, + // State 115 + 0, 122, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 116 + -61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -61, -61, -61, -61, 0, -61, -61, 0, -61, 0, 0, -61, 0, 0, 0, 0, + // State 117 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 123, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 118 + -19, 0, -19, 0, -19, 0, -19, -19, -19, -19, -19, 0, -19, -19, -19, -19, -19, -19, 0, 0, -19, -19, -19, -19, -19, -19, 0, -19, -19, 0, -19, -19, 0, -19, 0, 0, 0, 0, + // State 119 + -20, 0, -20, 0, -20, 0, -20, -20, -20, -20, -20, 0, -20, -20, -20, -20, -20, -20, 0, 0, -20, -20, -20, -20, -20, -20, 0, -20, -20, 0, -20, -20, 0, -20, 0, 0, 0, 0, + // State 120 + -53, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -53, -53, -53, -53, 0, -53, -53, 0, -53, 0, 0, -53, 0, 0, 0, 0, + // State 121 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, + // State 122 + -60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -60, -60, -60, -60, 0, -60, -60, 0, -60, 0, 0, -60, 0, 0, 0, 0, + // State 123 + -54, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -54, -54, -54, -54, 0, -54, -54, 0, -54, 0, 0, -54, 0, 0, 0, 0, + // State 124 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 127, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 125 + -56, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -56, -56, -56, -56, 0, -56, -56, 0, -56, 0, 0, -56, 0, 0, 0, 0, + // State 126 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + // State 127 + -55, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -55, -55, -55, -55, 0, -55, -55, 0, -55, 0, 0, -55, 0, 0, 0, 0, ]; - fn __action(state: i8, integer: usize) -> i8 { - __ACTION[(state as usize) * 36 + integer] + fn __action(state: i16, integer: usize) -> i16 { + __ACTION[(state as usize) * 38 + integer] } - const __EOF_ACTION: &[i8] = &[ + const __EOF_ACTION: &[i16] = &[ // State 0 -50, // State 1 @@ -346,229 +380,270 @@ mod __parse__Program { // State 40 0, // State 41 - -71, + 0, // State 42 - -64, + 0, // State 43 - -43, + 0, // State 44 - -65, + 0, // State 45 - -58, + 0, // State 46 0, // State 47 - -31, + 0, // State 48 - -48, + -75, // State 49 -68, // State 50 - -9, + -43, // State 51 - 0, - // State 52 - -29, - // State 53 - -6, - // State 54 - -12, - // State 55 - -42, - // State 56 - -11, - // State 57 - -44, - // State 58 - -14, - // State 59 - -13, - // State 60 - -52, - // State 61 - -47, - // State 62 - -59, - // State 63 - 0, - // State 64 - 0, - // State 65 - 0, - // State 66 - -61, - // State 67 -69, + // State 52 + -62, + // State 53 + 0, + // State 54 + -31, + // State 55 + -48, + // State 56 + -72, + // State 57 + -9, + // State 58 + 0, + // State 59 + -29, + // State 60 + -6, + // State 61 + -12, + // State 62 + -42, + // State 63 + -11, + // State 64 + -44, + // State 65 + -14, + // State 66 + -13, + // State 67 + -52, // State 68 - -21, + -47, // State 69 - -22, + -63, // State 70 0, // State 71 - -70, + 0, // State 72 - -25, + 0, // State 73 - -27, + -65, // State 74 - 0, + -73, // State 75 - 0, + -21, // State 76 - -60, + -22, // State 77 0, // State 78 - -7, + -74, // State 79 - -8, + -25, // State 80 - -10, + -27, // State 81 - -33, + 0, // State 82 - -36, + 0, // State 83 - -34, + -64, // State 84 - -32, + 0, // State 85 - -37, + -7, // State 86 - -35, + -8, // State 87 - 0, + -10, // State 88 - 0, + -33, // State 89 - -16, + -36, // State 90 - -45, + -34, // State 91 - -46, + -32, // State 92 - -49, + -37, // State 93 - -23, + -35, // State 94 - -24, + 0, // State 95 - -30, + 0, // State 96 - -54, + -16, // State 97 - -53, + -45, // State 98 - 0, + -46, // State 99 - 0, + -49, // State 100 - -55, + -23, // State 101 - -15, + -24, // State 102 - -17, + -30, // State 103 - -18, + -58, // State 104 - -26, + 0, // State 105 - -28, - // State 106 -57, + // State 106 + 0, // State 107 0, // State 108 - -19, + 0, // State 109 - -20, + -59, // State 110 + -15, + // State 111 + -17, + // State 112 + -18, + // State 113 + -26, + // State 114 + -28, + // State 115 + 0, + // State 116 + -61, + // State 117 + 0, + // State 118 + -19, + // State 119 + -20, + // State 120 + -53, + // State 121 + 0, + // State 122 + -60, + // State 123 + -54, + // State 124 + 0, + // State 125 -56, + // State 126 + 0, + // State 127 + -55, ]; - fn __goto(state: i8, nt: usize) -> i8 { + fn __goto(state: i16, nt: usize) -> i16 { match nt { 2 => 13, 3 => match state { - 18 => 81, - 19 => 82, - 20 => 83, - 21 => 84, - 22 => 85, - 23 => 86, - _ => 47, + 18 => 88, + 19 => 89, + 20 => 90, + 21 => 91, + 22 => 92, + 23 => 93, + _ => 54, }, 4 => match state { - 28 => 92, - _ => 48, + 28 => 99, + _ => 55, }, - 5 => 49, + 5 => 56, 6 => match state { - 17 => 80, - _ => 50, + 17 => 87, + _ => 57, }, 7 => match state { - 25 => 88, - _ => 64, + 25 => 95, + _ => 71, }, 9 => match state { - 14 => 31, - 4 => 51, - 10 => 70, - 13 => 75, - 30 => 97, - _ => 65, + 14 => 33, + 4 => 58, + 10 => 77, + 13 => 82, + 31 => 105, + 32 => 106, + 42 => 120, + 43 => 123, + 44 => 124, + 45 => 125, + 46 => 127, + _ => 72, }, 10 => match state { - 0..=1 | 24 | 31..=32 | 37 => 40, - 2 => 45, - 3 => 46, - 6 => 63, - 9 => 68, - 12 => 72, - 29 => 93, - 33 => 102, - 34 => 103, - 35 => 104, - 36 => 105, - 38 => 108, - 39 => 109, - _ => 52, + 0..=1 | 24 | 33..=34 | 39 => 47, + 2 => 52, + 3 => 53, + 6 => 70, + 9 => 75, + 12 => 79, + 29 => 100, + 30 => 104, + 35 => 111, + 36 => 112, + 37 => 113, + 38 => 114, + 40 => 118, + 41 => 119, + _ => 59, }, 11 => match state { - 15 => 78, - 16 => 79, - _ => 53, + 15 => 85, + 16 => 86, + _ => 60, }, - 12 => 54, - 13 => 55, - 14 => 41, + 12 => 61, + 13 => 62, + 14 => 48, 15 => match state { - 5 => 62, - 9 => 69, - 12 => 73, - 29 => 94, - _ => 56, + 5 => 69, + 9 => 76, + 12 => 80, + 29 => 101, + _ => 63, }, 16 => match state { - 1 | 32 => 44, - _ => 42, + 1 | 34 => 51, + _ => 49, }, 18 => match state { 0 => 1, - _ => 32, + _ => 34, }, 19 => match state { - 31 => 99, - 37 => 107, - _ => 87, + 33 => 108, + 39 => 117, + _ => 94, }, 20 => match state { - 8 => 67, - 11 => 71, - 26 => 90, - 27 => 91, - _ => 57, + 8 => 74, + 11 => 78, + 26 => 97, + 27 => 98, + _ => 64, }, _ => 0, } @@ -594,6 +669,8 @@ mod __parse__Program { r###"">""###, r###"">=""###, r###""@""###, + r###""[""###, + r###""]""###, r###""||""###, r###""DEBUGVAR""###, r###""Else""###, @@ -612,7 +689,7 @@ mod __parse__Program { r###"r#"[0-9]+(\\.[0-9]+)?"#"###, r###"r#"\\s+"#"###, ]; - fn __expected_tokens(__state: i8) -> alloc::vec::Vec { + fn __expected_tokens(__state: i16) -> alloc::vec::Vec { __TERMINAL.iter().enumerate().filter_map(|(index, terminal)| { let next_state = __action(__state, index); if next_state == 0 { @@ -625,7 +702,7 @@ mod __parse__Program { fn __expected_tokens_from_states< 'input, >( - __states: &[i8], + __states: &[i16], _: core::marker::PhantomData<(&'input ())>, ) -> alloc::vec::Vec { @@ -652,9 +729,9 @@ mod __parse__Program { type TokenIndex = usize; type Symbol = __Symbol<'input>; type Success = Program; - type StateIndex = i8; - type Action = i8; - type ReduceIndex = i8; + type StateIndex = i16; + type Action = i16; + type ReduceIndex = i16; type NonterminalIndex = usize; #[inline] @@ -673,22 +750,22 @@ mod __parse__Program { } #[inline] - fn action(&self, state: i8, integer: usize) -> i8 { + fn action(&self, state: i16, integer: usize) -> i16 { __action(state, integer) } #[inline] - fn error_action(&self, state: i8) -> i8 { - __action(state, 36 - 1) + fn error_action(&self, state: i16) -> i16 { + __action(state, 38 - 1) } #[inline] - fn eof_action(&self, state: i8) -> i8 { + fn eof_action(&self, state: i16) -> i16 { __EOF_ACTION[state as usize] } #[inline] - fn goto(&self, state: i8, nt: usize) -> i8 { + fn goto(&self, state: i16, nt: usize) -> i16 { __goto(state, nt) } @@ -696,11 +773,11 @@ mod __parse__Program { __token_to_symbol(token_index, token, core::marker::PhantomData::<(&())>) } - fn expected_tokens(&self, state: i8) -> alloc::vec::Vec { + fn expected_tokens(&self, state: i16) -> alloc::vec::Vec { __expected_tokens(state) } - fn expected_tokens_from_states(&self, states: &[i8]) -> alloc::vec::Vec { + fn expected_tokens_from_states(&self, states: &[i16]) -> alloc::vec::Vec { __expected_tokens_from_states(states, core::marker::PhantomData::<(&())>) } @@ -719,9 +796,9 @@ mod __parse__Program { fn reduce( &mut self, - action: i8, + action: i16, start_location: Option<&Self::Location>, - states: &mut alloc::vec::Vec, + states: &mut alloc::vec::Vec, symbols: &mut alloc::vec::Vec<__state_machine::SymbolTriple>, ) -> Option<__state_machine::ParseResult> { __reduce( @@ -734,7 +811,7 @@ mod __parse__Program { ) } - fn simulate_reduce(&self, action: i8) -> __state_machine::SimulatedReduce { + fn simulate_reduce(&self, action: i16) -> __state_machine::SimulatedReduce { __simulate_reduce(action, core::marker::PhantomData::<(&())>) } } @@ -783,6 +860,8 @@ mod __parse__Program { Token(33, _) if true => Some(33), Token(34, _) if true => Some(34), Token(35, _) if true => Some(35), + Token(36, _) if true => Some(36), + Token(37, _) if true => Some(37), _ => None, } } @@ -795,8 +874,8 @@ mod __parse__Program { ) -> __Symbol<'input> { #[allow(clippy::manual_range_patterns)]match __token_index { - 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 => match __token { - Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) | Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(25, __tok0) | Token(26, __tok0) | Token(27, __tok0) | Token(28, __tok0) | Token(29, __tok0) | Token(30, __tok0) | Token(31, __tok0) | Token(32, __tok0) | Token(33, __tok0) | Token(34, __tok0) | Token(35, __tok0) if true => __Symbol::Variant0(__tok0), + 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 => match __token { + Token(0, __tok0) | Token(1, __tok0) | Token(2, __tok0) | Token(3, __tok0) | Token(4, __tok0) | Token(5, __tok0) | Token(6, __tok0) | Token(7, __tok0) | Token(8, __tok0) | Token(9, __tok0) | Token(10, __tok0) | Token(11, __tok0) | Token(12, __tok0) | Token(13, __tok0) | Token(14, __tok0) | Token(15, __tok0) | Token(16, __tok0) | Token(17, __tok0) | Token(18, __tok0) | Token(19, __tok0) | Token(20, __tok0) | Token(21, __tok0) | Token(22, __tok0) | Token(23, __tok0) | Token(24, __tok0) | Token(25, __tok0) | Token(26, __tok0) | Token(27, __tok0) | Token(28, __tok0) | Token(29, __tok0) | Token(30, __tok0) | Token(31, __tok0) | Token(32, __tok0) | Token(33, __tok0) | Token(34, __tok0) | Token(35, __tok0) | Token(36, __tok0) | Token(37, __tok0) if true => __Symbol::Variant0(__tok0), _ => unreachable!(), }, _ => unreachable!(), @@ -805,7 +884,7 @@ mod __parse__Program { fn __simulate_reduce< 'input, >( - __reduce_index: i8, + __reduce_index: i16, _: core::marker::PhantomData<(&'input ())>, ) -> __state_machine::SimulatedReduce<__StateMachine<'input>> { @@ -1124,113 +1203,137 @@ mod __parse__Program { } 52 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 4, + states_to_pop: 6, nonterminal_produced: 16, } } 53 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 4, + states_to_pop: 7, nonterminal_produced: 16, } } 54 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 5, + states_to_pop: 10, nonterminal_produced: 16, } } 55 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 7, + states_to_pop: 8, nonterminal_produced: 16, } } 56 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 6, + states_to_pop: 4, nonterminal_produced: 16, } } 57 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 4, nonterminal_produced: 16, } } 58 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, + states_to_pop: 5, nonterminal_produced: 16, } } 59 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 4, + states_to_pop: 7, nonterminal_produced: 16, } } 60 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 3, + states_to_pop: 6, nonterminal_produced: 16, } } 61 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 0, - nonterminal_produced: 17, + states_to_pop: 2, + nonterminal_produced: 16, } } 62 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 17, + states_to_pop: 2, + nonterminal_produced: 16, } } 63 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 1, - nonterminal_produced: 18, + states_to_pop: 4, + nonterminal_produced: 16, } } 64 => { __state_machine::SimulatedReduce::Reduce { - states_to_pop: 2, - nonterminal_produced: 18, + states_to_pop: 3, + nonterminal_produced: 16, } } 65 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 0, - nonterminal_produced: 19, + nonterminal_produced: 17, } } 66 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 19, + nonterminal_produced: 17, } } 67 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 1, - nonterminal_produced: 20, + nonterminal_produced: 18, } } 68 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, - nonterminal_produced: 20, + nonterminal_produced: 18, } } 69 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 0, + nonterminal_produced: 19, + } + } + 70 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 19, + } + } + 71 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 1, + nonterminal_produced: 20, + } + } + 72 => { __state_machine::SimulatedReduce::Reduce { states_to_pop: 2, nonterminal_produced: 20, } } - 70 => __state_machine::SimulatedReduce::Accept, + 73 => { + __state_machine::SimulatedReduce::Reduce { + states_to_pop: 2, + nonterminal_produced: 20, + } + } + 74 => __state_machine::SimulatedReduce::Accept, _ => panic!("invalid reduction index {__reduce_index}") } } @@ -1270,8 +1373,8 @@ mod __parse__Program { fn __accepts< 'input, >( - __error_state: Option, - __states: &[i8], + __error_state: Option, + __states: &[i16], __opt_integer: Option, _: core::marker::PhantomData<(&'input ())>, ) -> bool @@ -1304,9 +1407,9 @@ mod __parse__Program { 'input, >( input: &'input str, - __action: i8, + __action: i16, __lookahead_start: Option<&usize>, - __states: &mut alloc::vec::Vec, + __states: &mut alloc::vec::Vec, __symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>, _: core::marker::PhantomData<(&'input ())>, ) -> Option, &'static str>>> @@ -1523,6 +1626,18 @@ mod __parse__Program { __reduce69(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>) } 70 => { + __reduce70(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>) + } + 71 => { + __reduce71(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>) + } + 72 => { + __reduce72(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>) + } + 73 => { + __reduce73(input, __lookahead_start, __symbols, core::marker::PhantomData::<(&())>) + } + 74 => { // __Program = Program => ActionFn(0); let __sym0 = __pop_Variant7(__symbols); let __start = __sym0.0.clone(); @@ -1673,13 +1788,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ( ",") = Expr, "," => ActionFn(63); + // ( ",") = Expr, "," => ActionFn(67); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action63::<>(input, __sym0, __sym1); + let __nt = super::__action67::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 0) } @@ -1692,10 +1807,10 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ( ",")* = => ActionFn(61); + // ( ",")* = => ActionFn(65); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); let __end = __start; - let __nt = super::__action61::<>(input, &__start, &__end); + let __nt = super::__action65::<>(input, &__start, &__end); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (0, 1) } @@ -1708,11 +1823,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ( ",")* = ( ",")+ => ActionFn(62); + // ( ",")* = ( ",")+ => ActionFn(66); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action62::<>(input, __sym0); + let __nt = super::__action66::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (1, 1) } @@ -1725,13 +1840,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ( ",")+ = Expr, "," => ActionFn(66); + // ( ",")+ = Expr, "," => ActionFn(70); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action66::<>(input, __sym0, __sym1); + let __nt = super::__action70::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (2, 2) } @@ -1744,14 +1859,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // ( ",")+ = ( ",")+, Expr, "," => ActionFn(67); + // ( ",")+ = ( ",")+, Expr, "," => ActionFn(71); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action67::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action71::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant2(__nt), __end)); (3, 2) } @@ -1764,11 +1879,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AddExpr = MulExpr => ActionFn(22); + // AddExpr = MulExpr => ActionFn(26); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action22::<>(input, __sym0); + let __nt = super::__action26::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 3) } @@ -1781,14 +1896,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AddExpr = AddExpr, "+", MulExpr => ActionFn(23); + // AddExpr = AddExpr, "+", MulExpr => ActionFn(27); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action23::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 3) } @@ -1801,14 +1916,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AddExpr = AddExpr, "-", MulExpr => ActionFn(24); + // AddExpr = AddExpr, "-", MulExpr => ActionFn(28); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action24::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action28::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 3) } @@ -1821,11 +1936,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AndExpr = CmpExpr => ActionFn(13); + // AndExpr = CmpExpr => ActionFn(17); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action13::<>(input, __sym0); + let __nt = super::__action17::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 4) } @@ -1838,14 +1953,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AndExpr = AndExpr, "&&", CmpExpr => ActionFn(14); + // AndExpr = AndExpr, "&&", CmpExpr => ActionFn(18); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action14::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action18::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 4) } @@ -1858,11 +1973,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = STRING => ActionFn(31); + // AtomExpr = STRING => ActionFn(35); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action31::<>(input, __sym0); + let __nt = super::__action35::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 5) } @@ -1875,11 +1990,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = NUM => ActionFn(32); + // AtomExpr = NUM => ActionFn(36); let __sym0 = __pop_Variant6(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action32::<>(input, __sym0); + let __nt = super::__action36::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 5) } @@ -1892,11 +2007,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "True" => ActionFn(33); + // AtomExpr = "True" => ActionFn(37); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action33::<>(input, __sym0); + let __nt = super::__action37::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 5) } @@ -1909,11 +2024,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "False" => ActionFn(34); + // AtomExpr = "False" => ActionFn(38); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action34::<>(input, __sym0); + let __nt = super::__action38::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 5) } @@ -1926,7 +2041,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = Ident, "(", Comma, ")" => ActionFn(70); + // AtomExpr = Ident, "(", Comma, ")" => ActionFn(74); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant0(__symbols); let __sym2 = __pop_Variant3(__symbols); @@ -1934,7 +2049,7 @@ mod __parse__Program { let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym3.2.clone(); - let __nt = super::__action70::<>(input, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action74::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (4, 5) } @@ -1947,14 +2062,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = Ident, "(", ")" => ActionFn(71); + // AtomExpr = Ident, "(", ")" => ActionFn(75); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action71::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action75::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 5) } @@ -1967,7 +2082,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", Ident, ".", Ident => ActionFn(36); + // AtomExpr = "$", Ident, ".", Ident => ActionFn(40); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant5(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -1975,7 +2090,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym3.2.clone(); - let __nt = super::__action36::<>(input, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action40::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (4, 5) } @@ -1988,7 +2103,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", STRING, ".", Ident => ActionFn(37); + // AtomExpr = "$", STRING, ".", Ident => ActionFn(41); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant5(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -1996,7 +2111,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym3.2.clone(); - let __nt = super::__action37::<>(input, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action41::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (4, 5) } @@ -2009,7 +2124,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", "-", Ident, ".", Ident => ActionFn(38); + // AtomExpr = "$", "-", Ident, ".", Ident => ActionFn(42); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant5(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -2018,7 +2133,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym4.2.clone(); - let __nt = super::__action38::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action42::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (5, 5) } @@ -2031,7 +2146,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", "-", STRING, ".", Ident => ActionFn(39); + // AtomExpr = "$", "-", STRING, ".", Ident => ActionFn(43); assert!(__symbols.len() >= 5); let __sym4 = __pop_Variant5(__symbols); let __sym3 = __pop_Variant0(__symbols); @@ -2040,7 +2155,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym4.2.clone(); - let __nt = super::__action39::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); + let __nt = super::__action43::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (5, 5) } @@ -2053,13 +2168,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", Ident => ActionFn(40); + // AtomExpr = "$", Ident => ActionFn(44); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action40::<>(input, __sym0, __sym1); + let __nt = super::__action44::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 5) } @@ -2072,13 +2187,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", STRING => ActionFn(41); + // AtomExpr = "$", STRING => ActionFn(45); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action41::<>(input, __sym0, __sym1); + let __nt = super::__action45::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 5) } @@ -2091,14 +2206,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", "-", Ident => ActionFn(42); + // AtomExpr = "$", "-", Ident => ActionFn(46); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant5(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action42::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action46::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 5) } @@ -2111,14 +2226,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "$", "-", STRING => ActionFn(43); + // AtomExpr = "$", "-", STRING => ActionFn(47); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant5(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action43::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action47::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 5) } @@ -2131,13 +2246,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "@", Ident => ActionFn(44); + // AtomExpr = "@", Ident => ActionFn(48); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action44::<>(input, __sym0, __sym1); + let __nt = super::__action48::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 5) } @@ -2150,7 +2265,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "@", Ident, ".", Ident => ActionFn(45); + // AtomExpr = "@", Ident, ".", Ident => ActionFn(49); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant5(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -2158,7 +2273,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym3.2.clone(); - let __nt = super::__action45::<>(input, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action49::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (4, 5) } @@ -2171,13 +2286,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "@", STRING => ActionFn(46); + // AtomExpr = "@", STRING => ActionFn(50); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action46::<>(input, __sym0, __sym1); + let __nt = super::__action50::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 5) } @@ -2190,7 +2305,7 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "@", STRING, ".", Ident => ActionFn(47); + // AtomExpr = "@", STRING, ".", Ident => ActionFn(51); assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant5(__symbols); let __sym2 = __pop_Variant0(__symbols); @@ -2198,7 +2313,7 @@ mod __parse__Program { let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym3.2.clone(); - let __nt = super::__action47::<>(input, __sym0, __sym1, __sym2, __sym3); + let __nt = super::__action51::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (4, 5) } @@ -2211,11 +2326,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = Ident => ActionFn(48); + // AtomExpr = Ident => ActionFn(52); let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action48::<>(input, __sym0); + let __nt = super::__action52::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 5) } @@ -2228,14 +2343,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // AtomExpr = "(", Expr, ")" => ActionFn(49); + // AtomExpr = "(", Expr, ")" => ActionFn(53); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action49::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action53::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 5) } @@ -2248,11 +2363,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = AddExpr => ActionFn(15); + // CmpExpr = AddExpr => ActionFn(19); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action15::<>(input, __sym0); + let __nt = super::__action19::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 6) } @@ -2265,14 +2380,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, "=", AddExpr => ActionFn(16); + // CmpExpr = CmpExpr, "=", AddExpr => ActionFn(20); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action20::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2285,14 +2400,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, "!=", AddExpr => ActionFn(17); + // CmpExpr = CmpExpr, "!=", AddExpr => ActionFn(21); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action17::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action21::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2305,14 +2420,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, "<=", AddExpr => ActionFn(18); + // CmpExpr = CmpExpr, "<=", AddExpr => ActionFn(22); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action18::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action22::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2325,14 +2440,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, ">=", AddExpr => ActionFn(19); + // CmpExpr = CmpExpr, ">=", AddExpr => ActionFn(23); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action19::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action23::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2345,14 +2460,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, "<", AddExpr => ActionFn(20); + // CmpExpr = CmpExpr, "<", AddExpr => ActionFn(24); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action20::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action24::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2365,14 +2480,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // CmpExpr = CmpExpr, ">", AddExpr => ActionFn(21); + // CmpExpr = CmpExpr, ">", AddExpr => ActionFn(25); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action21::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action25::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 6) } @@ -2385,11 +2500,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Comma = Expr => ActionFn(68); + // Comma = Expr => ActionFn(72); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action68::<>(input, __sym0); + let __nt = super::__action72::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (1, 7) } @@ -2402,13 +2517,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Comma = ( ",")+, Expr => ActionFn(69); + // Comma = ( ",")+, Expr => ActionFn(73); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant2(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action69::<>(input, __sym0, __sym1); + let __nt = super::__action73::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant3(__nt), __end)); (2, 7) } @@ -2421,11 +2536,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Comma? = Comma => ActionFn(54); + // Comma? = Comma => ActionFn(58); let __sym0 = __pop_Variant3(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action54::<>(input, __sym0); + let __nt = super::__action58::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (1, 8) } @@ -2438,10 +2553,10 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Comma? = => ActionFn(55); + // Comma? = => ActionFn(59); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); let __end = __start; - let __nt = super::__action55::<>(input, &__start, &__end); + let __nt = super::__action59::<>(input, &__start, &__end); __symbols.push((__start, __Symbol::Variant4(__nt), __end)); (0, 8) } @@ -2454,11 +2569,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Expr = OrExpr => ActionFn(10); + // Expr = OrExpr => ActionFn(14); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action10::<>(input, __sym0); + let __nt = super::__action14::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 9) } @@ -2471,11 +2586,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Ident = r#"[a-zA-Z_][a-zA-Z0-9_#]*"# => ActionFn(53); + // Ident = r#"[a-zA-Z_][a-zA-Z0-9_#]*"# => ActionFn(57); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action53::<>(input, __sym0); + let __nt = super::__action57::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 10) } @@ -2488,11 +2603,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // MulExpr = UnExpr => ActionFn(25); + // MulExpr = UnExpr => ActionFn(29); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action25::<>(input, __sym0); + let __nt = super::__action29::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 11) } @@ -2505,14 +2620,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // MulExpr = MulExpr, "*", UnExpr => ActionFn(26); + // MulExpr = MulExpr, "*", UnExpr => ActionFn(30); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action26::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action30::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 11) } @@ -2525,14 +2640,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // MulExpr = MulExpr, "/", UnExpr => ActionFn(27); + // MulExpr = MulExpr, "/", UnExpr => ActionFn(31); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action27::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action31::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 11) } @@ -2545,11 +2660,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // NUM = r#"[0-9]+(\\.[0-9]+)?"# => ActionFn(52); + // NUM = r#"[0-9]+(\\.[0-9]+)?"# => ActionFn(56); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action52::<>(input, __sym0); + let __nt = super::__action56::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant6(__nt), __end)); (1, 12) } @@ -2562,11 +2677,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // OrExpr = AndExpr => ActionFn(11); + // OrExpr = AndExpr => ActionFn(15); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action11::<>(input, __sym0); + let __nt = super::__action15::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (1, 13) } @@ -2579,14 +2694,14 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // OrExpr = OrExpr, "||", AndExpr => ActionFn(12); + // OrExpr = OrExpr, "||", AndExpr => ActionFn(16); assert!(__symbols.len() >= 3); let __sym2 = __pop_Variant1(__symbols); let __sym1 = __pop_Variant0(__symbols); let __sym0 = __pop_Variant1(__symbols); let __start = __sym0.0.clone(); let __end = __sym2.2.clone(); - let __nt = super::__action12::<>(input, __sym0, __sym1, __sym2); + let __nt = super::__action16::<>(input, __sym0, __sym1, __sym2); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (3, 13) } @@ -2599,10 +2714,10 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Program = => ActionFn(74); + // Program = => ActionFn(78); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); let __end = __start; - let __nt = super::__action74::<>(input, &__start, &__end); + let __nt = super::__action78::<>(input, &__start, &__end); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (0, 14) } @@ -2615,11 +2730,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Program = Stmt+ => ActionFn(75); + // Program = Stmt+ => ActionFn(79); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action75::<>(input, __sym0); + let __nt = super::__action79::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant7(__nt), __end)); (1, 14) } @@ -2632,11 +2747,11 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // STRING = r#"\"[^\"]*\""# => ActionFn(51); + // STRING = r#"\"[^\"]*\""# => ActionFn(55); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action51::<>(input, __sym0); + let __nt = super::__action55::<>(input, __sym0); __symbols.push((__start, __Symbol::Variant5(__nt), __end)); (1, 15) } @@ -2649,17 +2764,19 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "Var", Ident, "=", Expr => ActionFn(2); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant1(__symbols); + // Stmt = "Var", Ident, ".", Ident, "=", Expr => ActionFn(2); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant1(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant5(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym3.2.clone(); - let __nt = super::__action2::<>(input, __sym0, __sym1, __sym2, __sym3); + let __end = __sym5.2.clone(); + let __nt = super::__action2::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (4, 16) + (6, 16) } fn __reduce53< 'input, @@ -2670,17 +2787,20 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "Var", Ident, "!", "assigned" => ActionFn(3); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); + // Stmt = "Var", Ident, "[", Expr, "]", "=", Expr => ActionFn(3); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant1(__symbols); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant1(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym3.2.clone(); - let __nt = super::__action3::<>(input, __sym0, __sym1, __sym2, __sym3); + let __end = __sym6.2.clone(); + let __nt = super::__action3::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (4, 16) + (7, 16) } fn __reduce54< 'input, @@ -2691,18 +2811,23 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "If", Expr, "Then", Stmts, "EndIf" => ActionFn(4); - assert!(__symbols.len() >= 5); + // Stmt = "Var", Ident, "[", Expr, "]", "[", Expr, "]", "=", Expr => ActionFn(4); + assert!(__symbols.len() >= 10); + let __sym9 = __pop_Variant1(__symbols); + let __sym8 = __pop_Variant0(__symbols); + let __sym7 = __pop_Variant0(__symbols); + let __sym6 = __pop_Variant1(__symbols); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant10(__symbols); + let __sym3 = __pop_Variant1(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant1(__symbols); + let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym4.2.clone(); - let __nt = super::__action4::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); + let __end = __sym9.2.clone(); + let __nt = super::__action4::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7, __sym8, __sym9); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (5, 16) + (10, 16) } fn __reduce55< 'input, @@ -2713,20 +2838,21 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "If", Expr, "Then", Stmts, "Else", Stmts, "EndIf" => ActionFn(5); - assert!(__symbols.len() >= 7); + // Stmt = "Var", Ident, "[", Expr, "]", "!", "assigned", Expr => ActionFn(5); + assert!(__symbols.len() >= 8); + let __sym7 = __pop_Variant1(__symbols); let __sym6 = __pop_Variant0(__symbols); - let __sym5 = __pop_Variant10(__symbols); + let __sym5 = __pop_Variant0(__symbols); let __sym4 = __pop_Variant0(__symbols); - let __sym3 = __pop_Variant10(__symbols); + let __sym3 = __pop_Variant1(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant1(__symbols); + let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym6.2.clone(); - let __nt = super::__action5::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); + let __end = __sym7.2.clone(); + let __nt = super::__action5::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6, __sym7); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (7, 16) + (8, 16) } fn __reduce56< 'input, @@ -2737,19 +2863,17 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "For", Ident, "In", Expr, Stmts, "EndFor" => ActionFn(6); - assert!(__symbols.len() >= 6); - let __sym5 = __pop_Variant0(__symbols); - let __sym4 = __pop_Variant10(__symbols); + // Stmt = "Var", Ident, "=", Expr => ActionFn(6); + assert!(__symbols.len() >= 4); let __sym3 = __pop_Variant1(__symbols); let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym5.2.clone(); - let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); + let __end = __sym3.2.clone(); + let __nt = super::__action6::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (6, 16) + (4, 16) } fn __reduce57< 'input, @@ -2760,15 +2884,17 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "DEBUGVAR", Ident => ActionFn(7); - assert!(__symbols.len() >= 2); + // Stmt = "Var", Ident, "!", "assigned" => ActionFn(7); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant0(__symbols); let __sym1 = __pop_Variant5(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action7::<>(input, __sym0, __sym1); + let __end = __sym3.2.clone(); + let __nt = super::__action7::<>(input, __sym0, __sym1, __sym2, __sym3); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (2, 16) + (4, 16) } fn __reduce58< 'input, @@ -2779,15 +2905,18 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = "Open", STRING => ActionFn(8); - assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant5(__symbols); + // Stmt = "If", Expr, "Then", Stmts, "EndIf" => ActionFn(8); + assert!(__symbols.len() >= 5); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant10(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action8::<>(input, __sym0, __sym1); + let __end = __sym4.2.clone(); + let __nt = super::__action8::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (2, 16) + (5, 16) } fn __reduce59< 'input, @@ -2798,17 +2927,20 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = Ident, "(", Comma, ")" => ActionFn(72); - assert!(__symbols.len() >= 4); - let __sym3 = __pop_Variant0(__symbols); - let __sym2 = __pop_Variant3(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant5(__symbols); + // Stmt = "If", Expr, "Then", Stmts, "Else", Stmts, "EndIf" => ActionFn(9); + assert!(__symbols.len() >= 7); + let __sym6 = __pop_Variant0(__symbols); + let __sym5 = __pop_Variant10(__symbols); + let __sym4 = __pop_Variant0(__symbols); + let __sym3 = __pop_Variant10(__symbols); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym3.2.clone(); - let __nt = super::__action72::<>(input, __sym0, __sym1, __sym2, __sym3); + let __end = __sym6.2.clone(); + let __nt = super::__action9::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5, __sym6); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (4, 16) + (7, 16) } fn __reduce60< 'input, @@ -2819,16 +2951,19 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt = Ident, "(", ")" => ActionFn(73); - assert!(__symbols.len() >= 3); + // Stmt = "For", Ident, "In", Expr, Stmts, "EndFor" => ActionFn(10); + assert!(__symbols.len() >= 6); + let __sym5 = __pop_Variant0(__symbols); + let __sym4 = __pop_Variant10(__symbols); + let __sym3 = __pop_Variant1(__symbols); let __sym2 = __pop_Variant0(__symbols); - let __sym1 = __pop_Variant0(__symbols); - let __sym0 = __pop_Variant5(__symbols); + let __sym1 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym2.2.clone(); - let __nt = super::__action73::<>(input, __sym0, __sym1, __sym2); + let __end = __sym5.2.clone(); + let __nt = super::__action10::<>(input, __sym0, __sym1, __sym2, __sym3, __sym4, __sym5); __symbols.push((__start, __Symbol::Variant8(__nt), __end)); - (3, 16) + (6, 16) } fn __reduce61< 'input, @@ -2839,12 +2974,15 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt* = => ActionFn(57); - let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); - let __end = __start; - let __nt = super::__action57::<>(input, &__start, &__end); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (0, 17) + // Stmt = "DEBUGVAR", Ident => ActionFn(11); + assert!(__symbols.len() >= 2); + let __sym1 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action11::<>(input, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (2, 16) } fn __reduce62< 'input, @@ -2855,13 +2993,15 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt* = Stmt+ => ActionFn(58); - let __sym0 = __pop_Variant9(__symbols); + // Stmt = "Open", STRING => ActionFn(12); + assert!(__symbols.len() >= 2); + let __sym1 = __pop_Variant5(__symbols); + let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action58::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 17) + let __end = __sym1.2.clone(); + let __nt = super::__action12::<>(input, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (2, 16) } fn __reduce63< 'input, @@ -2872,13 +3012,17 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt+ = Stmt => ActionFn(59); - let __sym0 = __pop_Variant8(__symbols); + // Stmt = Ident, "(", Comma, ")" => ActionFn(76); + assert!(__symbols.len() >= 4); + let __sym3 = __pop_Variant0(__symbols); + let __sym2 = __pop_Variant3(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); - let __end = __sym0.2.clone(); - let __nt = super::__action59::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (1, 18) + let __end = __sym3.2.clone(); + let __nt = super::__action76::<>(input, __sym0, __sym1, __sym2, __sym3); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (4, 16) } fn __reduce64< 'input, @@ -2889,15 +3033,16 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmt+ = Stmt+, Stmt => ActionFn(60); - assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant8(__symbols); - let __sym0 = __pop_Variant9(__symbols); + // Stmt = Ident, "(", ")" => ActionFn(77); + assert!(__symbols.len() >= 3); + let __sym2 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant0(__symbols); + let __sym0 = __pop_Variant5(__symbols); let __start = __sym0.0.clone(); - let __end = __sym1.2.clone(); - let __nt = super::__action60::<>(input, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant9(__nt), __end)); - (2, 18) + let __end = __sym2.2.clone(); + let __nt = super::__action77::<>(input, __sym0, __sym1, __sym2); + __symbols.push((__start, __Symbol::Variant8(__nt), __end)); + (3, 16) } fn __reduce65< 'input, @@ -2908,12 +3053,12 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmts = => ActionFn(76); + // Stmt* = => ActionFn(61); let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); let __end = __start; - let __nt = super::__action76::<>(input, &__start, &__end); - __symbols.push((__start, __Symbol::Variant10(__nt), __end)); - (0, 19) + let __nt = super::__action61::<>(input, &__start, &__end); + __symbols.push((__start, __Symbol::Variant9(__nt), __end)); + (0, 17) } fn __reduce66< 'input, @@ -2924,13 +3069,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // Stmts = Stmt+ => ActionFn(77); + // Stmt* = Stmt+ => ActionFn(62); let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action77::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant10(__nt), __end)); - (1, 19) + let __nt = super::__action62::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant9(__nt), __end)); + (1, 17) } fn __reduce67< 'input, @@ -2941,13 +3086,13 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // UnExpr = AtomExpr => ActionFn(28); - let __sym0 = __pop_Variant1(__symbols); + // Stmt+ = Stmt => ActionFn(63); + let __sym0 = __pop_Variant8(__symbols); let __start = __sym0.0.clone(); let __end = __sym0.2.clone(); - let __nt = super::__action28::<>(input, __sym0); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (1, 20) + let __nt = super::__action63::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant9(__nt), __end)); + (1, 18) } fn __reduce68< 'input, @@ -2958,15 +3103,15 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // UnExpr = "!", UnExpr => ActionFn(29); + // Stmt+ = Stmt+, Stmt => ActionFn(64); assert!(__symbols.len() >= 2); - let __sym1 = __pop_Variant1(__symbols); - let __sym0 = __pop_Variant0(__symbols); + let __sym1 = __pop_Variant8(__symbols); + let __sym0 = __pop_Variant9(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action29::<>(input, __sym0, __sym1); - __symbols.push((__start, __Symbol::Variant1(__nt), __end)); - (2, 20) + let __nt = super::__action64::<>(input, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant9(__nt), __end)); + (2, 18) } fn __reduce69< 'input, @@ -2977,13 +3122,82 @@ mod __parse__Program { _: core::marker::PhantomData<(&'input ())>, ) -> (usize, usize) { - // UnExpr = "-", UnExpr => ActionFn(30); + // Stmts = => ActionFn(80); + let __start = __lookahead_start.cloned().or_else(|| __symbols.last().map(|s| s.2)).unwrap_or_default(); + let __end = __start; + let __nt = super::__action80::<>(input, &__start, &__end); + __symbols.push((__start, __Symbol::Variant10(__nt), __end)); + (0, 19) + } + fn __reduce70< + 'input, + >( + input: &'input str, + __lookahead_start: Option<&usize>, + __symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: core::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // Stmts = Stmt+ => ActionFn(81); + let __sym0 = __pop_Variant9(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action81::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant10(__nt), __end)); + (1, 19) + } + fn __reduce71< + 'input, + >( + input: &'input str, + __lookahead_start: Option<&usize>, + __symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: core::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // UnExpr = AtomExpr => ActionFn(32); + let __sym0 = __pop_Variant1(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym0.2.clone(); + let __nt = super::__action32::<>(input, __sym0); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (1, 20) + } + fn __reduce72< + 'input, + >( + input: &'input str, + __lookahead_start: Option<&usize>, + __symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: core::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // UnExpr = "!", UnExpr => ActionFn(33); assert!(__symbols.len() >= 2); let __sym1 = __pop_Variant1(__symbols); let __sym0 = __pop_Variant0(__symbols); let __start = __sym0.0.clone(); let __end = __sym1.2.clone(); - let __nt = super::__action30::<>(input, __sym0, __sym1); + let __nt = super::__action33::<>(input, __sym0, __sym1); + __symbols.push((__start, __Symbol::Variant1(__nt), __end)); + (2, 20) + } + fn __reduce73< + 'input, + >( + input: &'input str, + __lookahead_start: Option<&usize>, + __symbols: &mut alloc::vec::Vec<(usize,__Symbol<'input>,usize)>, + _: core::marker::PhantomData<(&'input ())>, + ) -> (usize, usize) + { + // UnExpr = "-", UnExpr => ActionFn(34); + assert!(__symbols.len() >= 2); + let __sym1 = __pop_Variant1(__symbols); + let __sym0 = __pop_Variant0(__symbols); + let __start = __sym0.0.clone(); + let __end = __sym1.2.clone(); + let __nt = super::__action34::<>(input, __sym0, __sym1); __symbols.push((__start, __Symbol::Variant1(__nt), __end)); (2, 20) } @@ -3021,6 +3235,8 @@ mod __intern_token { (">", false), ("(?:>=)", false), ("@", false), + ("\\[", false), + ("\\]", false), ("(?:\\|\\|)", false), ("(?:DEBUGVAR)", false), ("(?:Else)", false), @@ -3073,6 +3289,100 @@ fn __action1< #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] fn __action2< 'input, +>( + input: &'input str, + (_, _, _): (usize, &'input str, usize), + (_, name, _): (usize, String, usize), + (_, _, _): (usize, &'input str, usize), + (_, prop, _): (usize, String, usize), + (_, _, _): (usize, &'input str, usize), + (_, v, _): (usize, Expression, usize), +) -> Statement +{ + Statement::VarDotAssign { + object: name, + property: prop, + value: v, + } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action3< + 'input, +>( + input: &'input str, + (_, _, _): (usize, &'input str, usize), + (_, name, _): (usize, String, usize), + (_, _, _): (usize, &'input str, usize), + (_, idx, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, _, _): (usize, &'input str, usize), + (_, v, _): (usize, Expression, usize), +) -> Statement +{ + Statement::VarIndexAssign { + name, + indices: vec![idx], + value: v, + assignment_type: AssignmentType::Equals, + } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action4< + 'input, +>( + input: &'input str, + (_, _, _): (usize, &'input str, usize), + (_, name, _): (usize, String, usize), + (_, _, _): (usize, &'input str, usize), + (_, idx, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, _, _): (usize, &'input str, usize), + (_, idx2, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, _, _): (usize, &'input str, usize), + (_, v, _): (usize, Expression, usize), +) -> Statement +{ + Statement::VarIndexAssign { + name, + indices: vec![idx, idx2], + value: v, + assignment_type: AssignmentType::Equals, + } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action5< + 'input, +>( + input: &'input str, + (_, _, _): (usize, &'input str, usize), + (_, name, _): (usize, String, usize), + (_, _, _): (usize, &'input str, usize), + (_, idx, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, _, _): (usize, &'input str, usize), + (_, _, _): (usize, &'input str, usize), + (_, v, _): (usize, Expression, usize), +) -> Statement +{ + Statement::VarIndexAssign { + name, + indices: vec![idx], + value: v, + assignment_type: AssignmentType::NotAssigned, + } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action6< + 'input, >( input: &'input str, (_, _, _): (usize, &'input str, usize), @@ -3090,7 +3400,7 @@ fn __action2< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action3< +fn __action7< 'input, >( input: &'input str, @@ -3109,7 +3419,7 @@ fn __action3< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action4< +fn __action8< 'input, >( input: &'input str, @@ -3129,7 +3439,7 @@ fn __action4< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action5< +fn __action9< 'input, >( input: &'input str, @@ -3151,7 +3461,7 @@ fn __action5< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action6< +fn __action10< 'input, >( input: &'input str, @@ -3172,7 +3482,7 @@ fn __action6< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action7< +fn __action11< 'input, >( input: &'input str, @@ -3185,7 +3495,7 @@ fn __action7< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action8< +fn __action12< 'input, >( input: &'input str, @@ -3198,7 +3508,7 @@ fn __action8< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action9< +fn __action13< 'input, >( input: &'input str, @@ -3211,76 +3521,16 @@ fn __action9< Statement::Call { name, args: args.unwrap_or_default() } } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action10< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, Expression, usize), -) -> Expression -{ - __0 -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action11< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, Expression, usize), -) -> Expression -{ - __0 -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action12< - 'input, ->( - input: &'input str, - (_, left, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), - (_, right, _): (usize, Expression, usize), -) -> Expression -{ - Expression::BinaryOp { - left: Box::new(left), - op: BinaryOpKind::Or, - right: Box::new(right), - } -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action13< - 'input, ->( - input: &'input str, - (_, __0, _): (usize, Expression, usize), -) -> Expression -{ - __0 -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] fn __action14< 'input, >( input: &'input str, - (_, left, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), - (_, right, _): (usize, Expression, usize), + (_, __0, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { - left: Box::new(left), - op: BinaryOpKind::And, - right: Box::new(right), - } + __0 } #[allow(unused_variables)] @@ -3306,7 +3556,11 @@ fn __action16< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Eq, right: Box::new(right) } + Expression::BinaryOp { + left: Box::new(left), + op: BinaryOpKind::Or, + right: Box::new(right), + } } #[allow(unused_variables)] @@ -3315,12 +3569,10 @@ fn __action17< 'input, >( input: &'input str, - (_, left, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), - (_, right, _): (usize, Expression, usize), + (_, __0, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Neq, right: Box::new(right) } + __0 } #[allow(unused_variables)] @@ -3334,7 +3586,11 @@ fn __action18< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Lte, right: Box::new(right) } + Expression::BinaryOp { + left: Box::new(left), + op: BinaryOpKind::And, + right: Box::new(right), + } } #[allow(unused_variables)] @@ -3343,12 +3599,10 @@ fn __action19< 'input, >( input: &'input str, - (_, left, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), - (_, right, _): (usize, Expression, usize), + (_, __0, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Gte, right: Box::new(right) } + __0 } #[allow(unused_variables)] @@ -3362,7 +3616,7 @@ fn __action20< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Lt, right: Box::new(right) } + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Eq, right: Box::new(right) } } #[allow(unused_variables)] @@ -3376,7 +3630,7 @@ fn __action21< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Gt, right: Box::new(right) } + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Neq, right: Box::new(right) } } #[allow(unused_variables)] @@ -3385,10 +3639,12 @@ fn __action22< 'input, >( input: &'input str, - (_, __0, _): (usize, Expression, usize), + (_, left, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, right, _): (usize, Expression, usize), ) -> Expression { - __0 + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Lte, right: Box::new(right) } } #[allow(unused_variables)] @@ -3402,7 +3658,7 @@ fn __action23< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Add, right: Box::new(right) } + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Gte, right: Box::new(right) } } #[allow(unused_variables)] @@ -3416,7 +3672,7 @@ fn __action24< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Sub, right: Box::new(right) } + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Lt, right: Box::new(right) } } #[allow(unused_variables)] @@ -3425,10 +3681,12 @@ fn __action25< 'input, >( input: &'input str, - (_, __0, _): (usize, Expression, usize), + (_, left, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, right, _): (usize, Expression, usize), ) -> Expression { - __0 + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Gt, right: Box::new(right) } } #[allow(unused_variables)] @@ -3437,12 +3695,10 @@ fn __action26< 'input, >( input: &'input str, - (_, left, _): (usize, Expression, usize), - (_, _, _): (usize, &'input str, usize), - (_, right, _): (usize, Expression, usize), + (_, __0, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Mul, right: Box::new(right) } + __0 } #[allow(unused_variables)] @@ -3456,13 +3712,27 @@ fn __action27< (_, right, _): (usize, Expression, usize), ) -> Expression { - Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Div, right: Box::new(right) } + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Add, right: Box::new(right) } } #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] fn __action28< 'input, +>( + input: &'input str, + (_, left, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, right, _): (usize, Expression, usize), +) -> Expression +{ + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Sub, right: Box::new(right) } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action29< + 'input, >( input: &'input str, (_, __0, _): (usize, Expression, usize), @@ -3473,7 +3743,47 @@ fn __action28< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action29< +fn __action30< + 'input, +>( + input: &'input str, + (_, left, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, right, _): (usize, Expression, usize), +) -> Expression +{ + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Mul, right: Box::new(right) } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action31< + 'input, +>( + input: &'input str, + (_, left, _): (usize, Expression, usize), + (_, _, _): (usize, &'input str, usize), + (_, right, _): (usize, Expression, usize), +) -> Expression +{ + Expression::BinaryOp { left: Box::new(left), op: BinaryOpKind::Div, right: Box::new(right) } +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action32< + 'input, +>( + input: &'input str, + (_, __0, _): (usize, Expression, usize), +) -> Expression +{ + __0 +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] +fn __action33< 'input, >( input: &'input str, @@ -3486,7 +3796,7 @@ fn __action29< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action30< +fn __action34< 'input, >( input: &'input str, @@ -3499,7 +3809,7 @@ fn __action30< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action31< +fn __action35< 'input, >( input: &'input str, @@ -3511,7 +3821,7 @@ fn __action31< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action32< +fn __action36< 'input, >( input: &'input str, @@ -3523,7 +3833,7 @@ fn __action32< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action33< +fn __action37< 'input, >( input: &'input str, @@ -3535,7 +3845,7 @@ fn __action33< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action34< +fn __action38< 'input, >( input: &'input str, @@ -3547,7 +3857,7 @@ fn __action34< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action35< +fn __action39< 'input, >( input: &'input str, @@ -3562,7 +3872,7 @@ fn __action35< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action36< +fn __action40< 'input, >( input: &'input str, @@ -3577,7 +3887,7 @@ fn __action36< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action37< +fn __action41< 'input, >( input: &'input str, @@ -3592,7 +3902,7 @@ fn __action37< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action38< +fn __action42< 'input, >( input: &'input str, @@ -3608,7 +3918,7 @@ fn __action38< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action39< +fn __action43< 'input, >( input: &'input str, @@ -3624,7 +3934,7 @@ fn __action39< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action40< +fn __action44< 'input, >( input: &'input str, @@ -3637,7 +3947,7 @@ fn __action40< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action41< +fn __action45< 'input, >( input: &'input str, @@ -3650,7 +3960,7 @@ fn __action41< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action42< +fn __action46< 'input, >( input: &'input str, @@ -3664,7 +3974,7 @@ fn __action42< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action43< +fn __action47< 'input, >( input: &'input str, @@ -3678,7 +3988,7 @@ fn __action43< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action44< +fn __action48< 'input, >( input: &'input str, @@ -3691,7 +4001,7 @@ fn __action44< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action45< +fn __action49< 'input, >( input: &'input str, @@ -3706,7 +4016,7 @@ fn __action45< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action46< +fn __action50< 'input, >( input: &'input str, @@ -3719,7 +4029,7 @@ fn __action46< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action47< +fn __action51< 'input, >( input: &'input str, @@ -3734,7 +4044,7 @@ fn __action47< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action48< +fn __action52< 'input, >( input: &'input str, @@ -3746,7 +4056,7 @@ fn __action48< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action49< +fn __action53< 'input, >( input: &'input str, @@ -3760,7 +4070,7 @@ fn __action49< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action50< +fn __action54< 'input, >( input: &'input str, @@ -3772,7 +4082,7 @@ fn __action50< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action51< +fn __action55< 'input, >( input: &'input str, @@ -3784,7 +4094,7 @@ fn __action51< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action52< +fn __action56< 'input, >( input: &'input str, @@ -3796,7 +4106,7 @@ fn __action52< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action53< +fn __action57< 'input, >( input: &'input str, @@ -3808,7 +4118,7 @@ fn __action53< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action54< +fn __action58< 'input, >( input: &'input str, @@ -3820,7 +4130,7 @@ fn __action54< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action55< +fn __action59< 'input, >( input: &'input str, @@ -3833,7 +4143,7 @@ fn __action55< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action56< +fn __action60< 'input, >( input: &'input str, @@ -3850,7 +4160,7 @@ fn __action56< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action57< +fn __action61< 'input, >( input: &'input str, @@ -3863,7 +4173,7 @@ fn __action57< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action58< +fn __action62< 'input, >( input: &'input str, @@ -3875,7 +4185,7 @@ fn __action58< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action59< +fn __action63< 'input, >( input: &'input str, @@ -3887,7 +4197,7 @@ fn __action59< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action60< +fn __action64< 'input, >( input: &'input str, @@ -3900,7 +4210,7 @@ fn __action60< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action61< +fn __action65< 'input, >( input: &'input str, @@ -3913,7 +4223,7 @@ fn __action61< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action62< +fn __action66< 'input, >( input: &'input str, @@ -3925,7 +4235,7 @@ fn __action62< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action63< +fn __action67< 'input, >( input: &'input str, @@ -3938,7 +4248,7 @@ fn __action63< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action64< +fn __action68< 'input, >( input: &'input str, @@ -3950,7 +4260,7 @@ fn __action64< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action65< +fn __action69< 'input, >( input: &'input str, @@ -3964,7 +4274,7 @@ fn __action65< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action66< +fn __action70< 'input, >( input: &'input str, @@ -3974,124 +4284,18 @@ fn __action66< { let __start0 = __0.0; let __end0 = __1.2; - let __temp0 = __action63( + let __temp0 = __action67( input, __0, __1, ); let __temp0 = (__start0, __temp0, __end0); - __action64( + __action68( input, __temp0, ) } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action67< - 'input, ->( - input: &'input str, - __0: (usize, alloc::vec::Vec, usize), - __1: (usize, Expression, usize), - __2: (usize, &'input str, usize), -) -> alloc::vec::Vec -{ - let __start0 = __1.0; - let __end0 = __2.2; - let __temp0 = __action63( - input, - __1, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action65( - input, - __0, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action68< - 'input, ->( - input: &'input str, - __0: (usize, Expression, usize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.0; - let __temp0 = __action61( - input, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action56( - input, - __temp0, - __0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action69< - 'input, ->( - input: &'input str, - __0: (usize, alloc::vec::Vec, usize), - __1: (usize, Expression, usize), -) -> Vec -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action62( - input, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action56( - input, - __temp0, - __1, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action70< - 'input, ->( - input: &'input str, - __0: (usize, String, usize), - __1: (usize, &'input str, usize), - __2: (usize, Vec, usize), - __3: (usize, &'input str, usize), -) -> Expression -{ - let __start0 = __2.0; - let __end0 = __2.2; - let __temp0 = __action54( - input, - __2, - ); - let __temp0 = (__start0, __temp0, __end0); - __action35( - input, - __0, - __1, - __temp0, - __3, - ) -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] @@ -4099,25 +4303,23 @@ fn __action71< 'input, >( input: &'input str, - __0: (usize, String, usize), - __1: (usize, &'input str, usize), + __0: (usize, alloc::vec::Vec, usize), + __1: (usize, Expression, usize), __2: (usize, &'input str, usize), -) -> Expression +) -> alloc::vec::Vec { - let __start0 = __1.2; - let __end0 = __2.0; - let __temp0 = __action55( + let __start0 = __1.0; + let __end0 = __2.2; + let __temp0 = __action67( input, - &__start0, - &__end0, + __1, + __2, ); let __temp0 = (__start0, __temp0, __end0); - __action35( + __action69( input, __0, - __1, __temp0, - __2, ) } @@ -4126,22 +4328,72 @@ fn __action71< clippy::just_underscores_and_digits)] fn __action72< 'input, +>( + input: &'input str, + __0: (usize, Expression, usize), +) -> Vec +{ + let __start0 = __0.0; + let __end0 = __0.0; + let __temp0 = __action65( + input, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action60( + input, + __temp0, + __0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action73< + 'input, +>( + input: &'input str, + __0: (usize, alloc::vec::Vec, usize), + __1: (usize, Expression, usize), +) -> Vec +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action66( + input, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action60( + input, + __temp0, + __1, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action74< + 'input, >( input: &'input str, __0: (usize, String, usize), __1: (usize, &'input str, usize), __2: (usize, Vec, usize), __3: (usize, &'input str, usize), -) -> Statement +) -> Expression { let __start0 = __2.0; let __end0 = __2.2; - let __temp0 = __action54( + let __temp0 = __action58( input, __2, ); let __temp0 = (__start0, __temp0, __end0); - __action9( + __action39( input, __0, __1, @@ -4153,24 +4405,24 @@ fn __action72< #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] -fn __action73< +fn __action75< 'input, >( input: &'input str, __0: (usize, String, usize), __1: (usize, &'input str, usize), __2: (usize, &'input str, usize), -) -> Statement +) -> Expression { let __start0 = __1.2; let __end0 = __2.0; - let __temp0 = __action55( + let __temp0 = __action59( input, &__start0, &__end0, ); let __temp0 = (__start0, __temp0, __end0); - __action9( + __action39( input, __0, __1, @@ -4179,54 +4431,6 @@ fn __action73< ) } -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action74< - 'input, ->( - input: &'input str, - __lookbehind: &usize, - __lookahead: &usize, -) -> Program -{ - let __start0 = *__lookbehind; - let __end0 = *__lookahead; - let __temp0 = __action57( - input, - &__start0, - &__end0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1( - input, - __temp0, - ) -} - -#[allow(unused_variables)] -#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, - clippy::just_underscores_and_digits)] -fn __action75< - 'input, ->( - input: &'input str, - __0: (usize, alloc::vec::Vec, usize), -) -> Program -{ - let __start0 = __0.0; - let __end0 = __0.2; - let __temp0 = __action58( - input, - __0, - ); - let __temp0 = (__start0, __temp0, __end0); - __action1( - input, - __temp0, - ) -} - #[allow(unused_variables)] #[allow(clippy::too_many_arguments, clippy::needless_lifetimes, clippy::just_underscores_and_digits)] @@ -4234,21 +4438,25 @@ fn __action76< 'input, >( input: &'input str, - __lookbehind: &usize, - __lookahead: &usize, -) -> Vec + __0: (usize, String, usize), + __1: (usize, &'input str, usize), + __2: (usize, Vec, usize), + __3: (usize, &'input str, usize), +) -> Statement { - let __start0 = *__lookbehind; - let __end0 = *__lookahead; - let __temp0 = __action57( + let __start0 = __2.0; + let __end0 = __2.2; + let __temp0 = __action58( input, - &__start0, - &__end0, + __2, ); let __temp0 = (__start0, __temp0, __end0); - __action50( + __action13( input, + __0, + __1, __temp0, + __3, ) } @@ -4257,6 +4465,108 @@ fn __action76< clippy::just_underscores_and_digits)] fn __action77< 'input, +>( + input: &'input str, + __0: (usize, String, usize), + __1: (usize, &'input str, usize), + __2: (usize, &'input str, usize), +) -> Statement +{ + let __start0 = __1.2; + let __end0 = __2.0; + let __temp0 = __action59( + input, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action13( + input, + __0, + __1, + __temp0, + __2, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action78< + 'input, +>( + input: &'input str, + __lookbehind: &usize, + __lookahead: &usize, +) -> Program +{ + let __start0 = *__lookbehind; + let __end0 = *__lookahead; + let __temp0 = __action61( + input, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1( + input, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action79< + 'input, +>( + input: &'input str, + __0: (usize, alloc::vec::Vec, usize), +) -> Program +{ + let __start0 = __0.0; + let __end0 = __0.2; + let __temp0 = __action62( + input, + __0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action1( + input, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action80< + 'input, +>( + input: &'input str, + __lookbehind: &usize, + __lookahead: &usize, +) -> Vec +{ + let __start0 = *__lookbehind; + let __end0 = *__lookahead; + let __temp0 = __action61( + input, + &__start0, + &__end0, + ); + let __temp0 = (__start0, __temp0, __end0); + __action54( + input, + __temp0, + ) +} + +#[allow(unused_variables)] +#[allow(clippy::too_many_arguments, clippy::needless_lifetimes, + clippy::just_underscores_and_digits)] +fn __action81< + 'input, >( input: &'input str, __0: (usize, alloc::vec::Vec, usize), @@ -4264,12 +4574,12 @@ fn __action77< { let __start0 = __0.0; let __end0 = __0.2; - let __temp0 = __action58( + let __temp0 = __action62( input, __0, ); let __temp0 = (__start0, __temp0, __end0); - __action50( + __action54( input, __temp0, ) diff --git a/src/xml/parser/mod.rs b/src/xml/parser/mod.rs index d3f0e2a..fe2b06c 100644 --- a/src/xml/parser/mod.rs +++ b/src/xml/parser/mod.rs @@ -350,8 +350,144 @@ CacheVarStr "get" XMLProfile } #[test] - fn test_neq_in_condition() { - let result = ScriptParser::parse("If x != \"\" Then Var y = 1 EndIf"); + fn test_var_dot_assign() { + let result = ScriptParser::parse("Var Seeker.thankLidFlag = 0"); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_var_index_assign() { + let result = ScriptParser::parse("Var PriceMain[0] = $12-01-01-0003.Price"); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_var_2d_index_assign() { + let result = ScriptParser::parse(r#"Var NameLang[0][0] = "HOT Americano""#); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_var_index_not_assigned() { + let result = ScriptParser::parse("Var PriceTag[0] !assigned StringFmt(1, 2)"); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_if_else_with_call() { + let script = r#"If TaobinPremiumEnable = 1 Then +Else +RootLayoutVisible(3, "hide") +EndIf"#; + let result = ScriptParser::parse(script); + if let Err(ref e) = result { + eprintln!("ERROR: {}", e); + } + assert!(result.is_ok(), "parse failed"); + } + + #[test] + fn test_multiple_if_blocks() { + let result = ScriptParser::parse( + "If x = 1 Then Var y = 2 EndIf\nIf z = 3 Then Var w = 4 EndIf" + ); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + let program = result.unwrap(); + assert_eq!(program.statements.len(), 2); + } + + #[test] + fn test_if_with_empty_then_else() { + let result = ScriptParser::parse( + "If x = 1 Then\nElse\nVar y = 2\nEndIf" + ); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_hash_quoted_ident() { + let script = r#"STRCONTAIN("1037", MaterialAvailable, #"7UpSyrupEnable")"#; + let parser = ProgramParser::new(); + let result = parser.parse(script); + if let Err(e) = result { + let err = crate::xml::error::ParseError::from_lalrpop_error(script, e); + eprintln!("ERROR for quoted ident: {}", err); + panic!("parse failed"); + } + } + + #[test] + fn test_hyphenated_action_call() { + let script = r#"#"SET-MENU-SHOW"("Hot", 1)"#; + let parser = ProgramParser::new(); + let result = parser.parse(script); + if let Err(e) = result { + let err = crate::xml::error::ParseError::from_lalrpop_error(script, e); + eprintln!("ERROR for hyphenated call: {}", err); + panic!("parse failed"); + } + } + + #[test] + fn test_led_action_call() { + let result = ScriptParser::parse(r#"LEDv2("LedDoorCupV2", "Off", 255, 194, 166, 20, 6)"#); + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + let program = result.unwrap(); + match &program.statements[0] { + Statement::Call { name, args } => { + assert_eq!(name, "LEDv2"); + assert_eq!(args.len(), 7); + } + _ => panic!("Expected Call statement"), + } + } + + #[test] + fn test_read_file_and_strcontain() { + let script = r#"VAR cock_tail_str "" +VAR cock_tail_enable "" +READ_FILE("/mnt/sdcard/cock_tail_enable", cock_tail_str) +STRCONTAIN("1", cock_tail_str, cock_tail_enable) +If cock_tail_enable = "true" Then + Var WheyShow = "false" +EndIf"#; + let result = ScriptParser::parse(script); + if let Err(ref e) = result { + eprintln!("Parse error: {:?}", e); + } + assert!(result.is_ok(), "parse failed: {:?}", result.err()); + } + + #[test] + fn test_strcontain_with_if_block() { + let script = r#"Var cock_tail_str = "" +Var BeerTrapEnable = "" +READ_FILE("/mnt/sdcard/cock_tail_enable", cock_tail_str) +STRCONTAIN("1", cock_tail_str, cock_tail_enable) +If cock_tail_enable = "true" Then + Var WheyShow = "false" + Var CocktailShow = "true" + Var RoadShow = "true" + STRCONTAIN("1401", MaterialAvailable, BeerTrapEnable) +Else + Var WheyShow = "true" + Var CocktailShow = "false" +EndIf"#; + let result = ScriptParser::parse(script); + if let Err(ref e) = result { + eprintln!("ERROR: {}", e); + } + assert!(result.is_ok(), "parse failed"); + } + + #[test] + fn test_cmd_with_dashes() { + // __CMD is a valid identifier (no hyphens, starts with _) + let script = r#"__CMD("mcu-version", "-", "-", "-")"#; + let result = ScriptParser::parse(script); + if let Err(ref e) = result { + eprintln!("ERROR: {}", e); + } assert!(result.is_ok(), "parse failed: {:?}", result.err()); } @@ -363,7 +499,18 @@ CacheVarStr "get" XMLProfile let end = content.find("").unwrap(); let script = &content[start + 12..end].trim(); - let result = ScriptParser::parse(script); - assert!(result.is_ok(), "parse failed: {:?}", result.err()); + let preprocessed = preprocess::preprocess(script); + let parser = ProgramParser::new(); + match parser.parse(&preprocessed) { + Ok(prog) => { + // Successfully parsed! Check we got a reasonable number of statements + assert!(prog.statements.len() > 0, "No statements parsed"); + } + Err(e) => { + let err = crate::xml::error::ParseError::from_lalrpop_error(&preprocessed, e); + std::fs::write("/tmp/page_board_parse_error.txt", format!("{}", err)).unwrap(); + panic!("LALRPOP parse error - written to /tmp/page_board_parse_error.txt"); + } + } } } \ No newline at end of file diff --git a/src/xml/parser/preprocess.rs b/src/xml/parser/preprocess.rs index 49bbf08..fe660c1 100644 --- a/src/xml/parser/preprocess.rs +++ b/src/xml/parser/preprocess.rs @@ -6,7 +6,7 @@ const KEYWORDS: &[&str] = &[ ]; fn is_keyword(word: &str) -> bool { - KEYWORDS.contains(&word) + KEYWORDS.contains(&word) || word.eq_ignore_ascii_case("EndIf") } fn strip_comments(source: &str) -> String { @@ -44,7 +44,7 @@ fn strip_comment_from_line(line: &str) -> String { result } -fn needs_quoting(name: &str) -> bool { +fn needs_dollar_quoting(name: &str) -> bool { name.contains('-') || name.starts_with(|c: char| c.is_ascii_digit()) } @@ -52,8 +52,22 @@ fn normalize_dollar_vars(text: &str) -> String { let mut result = String::new(); let chars: Vec = text.chars().collect(); let mut i = 0; + let mut in_string = false; while i < chars.len() { + if chars[i] == '"' { + in_string = !in_string; + result.push(chars[i]); + i += 1; + continue; + } + + if in_string { + result.push(chars[i]); + i += 1; + continue; + } + if chars[i] == '$' { i += 1; let neg = i < chars.len() && chars[i] == '-'; @@ -80,7 +94,7 @@ fn normalize_dollar_vars(text: &str) -> String { } else { write!(result, "@\"{}\".{}", name, prop).unwrap(); } - } else if needs_quoting(&name) { + } else if needs_dollar_quoting(&name) { if neg { write!(result, "$-\"{}\"", name).unwrap(); } else { @@ -104,6 +118,179 @@ fn is_action_start(word: &str) -> bool { !is_keyword(word) && !word.is_empty() } +fn needs_quoting(word: &str) -> bool { + (word.starts_with(|c: char| c.is_ascii_digit()) && word.chars().any(|c: char| c.is_ascii_alphabetic())) + || word.contains('-') +} + +fn quote_identifier(word: &str) -> String { + format!("#\"{}\"", word) +} + +fn normalize_digit_idents(text: &str) -> String { + let mut result = String::new(); + let mut in_string = false; + let mut word_start = None; + let chars: Vec = text.chars().collect(); + let mut i = 0; + + while i < chars.len() { + let ch = chars[i]; + + if ch == '"' { + if word_start.is_some() { + let start = word_start.unwrap(); + let word: String = chars[start..i].iter().collect(); + if needs_quoting(&word) { + result.push_str("e_identifier(&word)); + } else { + result.push_str(&word); + } + word_start = None; + } + if in_string { + in_string = false; + result.push(ch); + } else { + in_string = true; + result.push(ch); + } + i += 1; + continue; + } + + if in_string { + result.push(ch); + i += 1; + continue; + } + + // Skip dollar-variable patterns: $var, $-var, $"var", $-"var" + if ch == '$' || ch == '@' { + if word_start.is_some() { + let start = word_start.unwrap(); + let word: String = chars[start..i].iter().collect(); + if needs_quoting(&word) { + result.push_str("e_identifier(&word)); + } else { + result.push_str(&word); + } + word_start = None; + } + result.push(ch); + i += 1; + // Skip optional '-' for negative vars + if i < chars.len() && chars[i] == '-' { + result.push(chars[i]); + i += 1; + } + // Skip over quoted var names like "var-name" + if i < chars.len() && chars[i] == '"' { + result.push(chars[i]); + i += 1; + while i < chars.len() && chars[i] != '"' { + result.push(chars[i]); + i += 1; + } + if i < chars.len() { + result.push(chars[i]); // closing " + i += 1; + } + // Skip .property after $"var" or @"var" + if i < chars.len() && chars[i] == '.' { + result.push(chars[i]); + i += 1; + // Skip property name (possibly quoted) + if i < chars.len() && chars[i] == '"' { + result.push(chars[i]); + i += 1; + while i < chars.len() && chars[i] != '"' { + result.push(chars[i]); + i += 1; + } + if i < chars.len() { + result.push(chars[i]); + i += 1; + } + } else { + // Unquoted property: alphanumeric/_ + while i < chars.len() && (chars[i].is_ascii_alphanumeric() || chars[i] == '_' || chars[i] == '#') { + result.push(chars[i]); + i += 1; + } + } + } + } else { + // Unquoted var name: alphanumeric/hyphen/_ until separator + // But we already handled $- above, so skip to letter/digit/_ + while i < chars.len() && (chars[i].is_ascii_alphanumeric() || chars[i] == '_' || chars[i] == '#') { + result.push(chars[i]); + i += 1; + } + // Check for .property + if i < chars.len() && chars[i] == '.' { + result.push(chars[i]); + i += 1; + while i < chars.len() && (chars[i].is_ascii_alphanumeric() || chars[i] == '_' || chars[i] == '#') { + result.push(chars[i]); + i += 1; + } + } + } + continue; + } + + if ch.is_ascii_alphanumeric() || ch == '_' || ch == '#' { + if word_start.is_none() { + word_start = Some(i); + } + i += 1; + continue; + } + + // Hyphen: part of a word if preceded by word chars (like SET-MENU-SHOW) + if ch == '-' { + if word_start.is_some() { + // Continue the word through hyphens + i += 1; + continue; + } + // Not part of a word, just output it + result.push(ch); + i += 1; + continue; + } + + if let Some(start) = word_start { + let word: String = chars[start..i].iter().collect(); + if needs_quoting(&word) { + result.push_str("e_identifier(&word)); + } else { + result.push_str(&word); + } + word_start = None; + } + + result.push(ch); + i += 1; + } + + if let Some(start) = word_start { + let word: String = chars[start..].iter().collect(); + if needs_quoting(&word) { + result.push_str("e_identifier(&word)); + } else { + result.push_str(&word); + } + } + + result +} + +fn normalize_keywords(line: &str) -> String { + line.replace("Endif", "EndIf") +} + fn tokenize_action_args(rest: &str) -> Vec { let mut args = Vec::new(); let mut current = String::new(); @@ -134,19 +321,19 @@ fn tokenize_action_args(rest: &str) -> Vec { paren_depth -= 1; } if paren_depth == 0 && !current.trim().is_empty() { - args.push(current.trim().to_string()); + args.push(tokenize_arg(current.trim())); current.clear(); } } ' ' | '\t' if paren_depth == 0 => { if !current.is_empty() { - args.push(current.trim().to_string()); + args.push(tokenize_arg(current.trim())); current.clear(); } } ',' if paren_depth == 0 => { if !current.is_empty() { - args.push(current.trim().to_string()); + args.push(tokenize_arg(current.trim())); current.clear(); } } @@ -157,12 +344,23 @@ fn tokenize_action_args(rest: &str) -> Vec { } if !current.trim().is_empty() { - args.push(current.trim().to_string()); + args.push(tokenize_arg(current.trim())); } args } +fn tokenize_arg(arg: &str) -> String { + // Don't quote string literals or numbers + if arg.starts_with('"') || arg.parse::().is_ok() { + normalize_dollar_vars(arg).to_string() + } else if needs_quoting(arg) { + quote_identifier(arg) + } else { + normalize_dollar_vars(arg).to_string() + } +} + fn handle_var_line(line: &str) -> String { let line = normalize_dollar_vars(line); let trimmed = line.trim(); @@ -207,6 +405,8 @@ fn handle_var_line(line: &str) -> String { fn normalize_line(line: &str) -> String { let line = normalize_dollar_vars(line); + let line = normalize_digit_idents(&line); + let line = normalize_keywords(&line); let trimmed = line.trim(); if trimmed.is_empty() { @@ -358,4 +558,39 @@ mod tests { fn test_dollar_var_negative_with_property() { assert_eq!(normalize_dollar_vars("$-12-01-01-0003.Price"), "$-\"12-01-01-0003\".Price"); } + + #[test] + fn test_digit_quoting() { + assert_eq!(normalize_digit_idents("7UpSyrupEnable"), "#\"7UpSyrupEnable\""); + assert_eq!(normalize_digit_idents("SET-MENU-SHOW"), "#\"SET-MENU-SHOW\""); + assert_eq!(normalize_digit_idents("normalVar"), "normalVar"); + assert_eq!(normalize_digit_idents("__CMD"), "__CMD"); + assert_eq!(normalize_digit_idents("$-myVar"), "$-myVar"); + } + + #[test] + fn test_normalize_hyphen_ident() { + assert_eq!(normalize_line("SET-MENU-SHOW \"Hot\" 1"), "#\"SET-MENU-SHOW\"(\"Hot\", 1)"); + } + + #[test] + fn test_normalize_digit_in_function_arg() { + assert_eq!(normalize_line("STRCONTAIN \"1037\" MaterialAvailable 7UpSyrupEnable"), "STRCONTAIN(\"1037\", MaterialAvailable, #\"7UpSyrupEnable\")"); + } + +#[test] + fn test_normalize_cmd_action() { + assert_eq!(normalize_line("__CMD \"mcu-version\" \"-\" \"-\" \"-\""), "__CMD(\"mcu-version\", \"-\", \"-\", \"-\")"); + } + + #[test] + fn test_normalize_endif_lowercase() { + assert_eq!(normalize_line("Endif"), "EndIf"); + } + + #[test] + fn test_dollar_inside_string_preserved() { + assert_eq!(normalize_dollar_vars(r#"Var x = "HK$""#), r#"Var x = "HK$""#); + assert_eq!(normalize_dollar_vars(r#"$var = "price is $5""#), r#"$var = "price is $5""#); + } } \ No newline at end of file diff --git a/src/xml/vm/mod.rs b/src/xml/vm/mod.rs index 20c9d0a..2fabe37 100644 --- a/src/xml/vm/mod.rs +++ b/src/xml/vm/mod.rs @@ -452,6 +452,40 @@ impl Vm { } Ok(()) } + Statement::VarDotAssign { object, property, value } => { + let val = self.eval_expr(value)?; + let key = format!("{}.{}", object, property); + self.globals.insert(key, val); + Ok(()) + } + Statement::VarIndexAssign { name, indices, value, assignment_type } => { + let val = self.eval_expr(value)?; + if indices.len() == 1 { + let idx = self.eval_expr(&indices[0])?; + let idx_key = match idx { + Value::Number(n) => format!("{}[{}]", name, n as i64), + Value::String(s) => format!("{}[{}]", name, s), + _ => format!("{}[{:?}]", name, idx), + }; + if *assignment_type == AssignmentType::NotAssigned { + self.globals.entry(idx_key).or_insert(val); + } else { + self.globals.insert(idx_key, val); + } + } else { + let idx_parts: VmResult> = indices.iter().map(|i| { + self.eval_expr(i).map(|v| match v { + Value::Number(n) => format!("{}", n as i64), + Value::String(s) => s, + _ => format!("{:?}", v), + }) + }).collect(); + let idx_parts = idx_parts?; + let idx_key = format!("{}[{}]", name, idx_parts.join("][")); + self.globals.insert(idx_key, val); + } + Ok(()) + } } }