Commit 1822adc0 authored by jhe's avatar jhe

lab1&lab2

parent ff3807a8
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -24,12 +24,12 @@ class Scope {
// push a name to scope
// return true if successful
// return false if this name already exits
bool push(const std::string& name, Value *val) {
bool push(const std::string &name, Value *val) {
auto result = inner[inner.size() - 1].insert({name, val});
return result.second;
}
Value *find(const std::string& name) {
Value *find(const std::string &name) {
for (auto s = inner.rbegin(); s != inner.rend(); s++) {
auto iter = s->find(name);
if (iter != s->end()) {
......@@ -62,11 +62,13 @@ class CminusfBuilder : public ASTVisitor {
std::vector<Type *> output_params;
output_params.push_back(TyInt32);
auto *output_type = FunctionType::get(TyVoid, output_params);
auto *output_fun = Function::create(output_type, "output", module.get());
auto *output_fun =
Function::create(output_type, "output", module.get());
std::vector<Type *> output_float_params;
output_float_params.push_back(TyFloat);
auto *output_float_type = FunctionType::get(TyVoid, output_float_params);
auto *output_float_type =
FunctionType::get(TyVoid, output_float_params);
auto *output_float_fun =
Function::create(output_float_type, "outputFloat", module.get());
......@@ -106,8 +108,11 @@ class CminusfBuilder : public ASTVisitor {
std::unique_ptr<Module> module;
struct {
// whether require lvalue
bool require_lvalue = false;
// function that is being built
Function *func = nullptr;
// TODO: you should add more fields to store state
// detect scope pre-enter (for elegance only)
bool pre_enter_scope = false;
} context;
};
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
/*
* 声明:本代码为 2023 秋 中国科大编译原理(李诚)课程实验参考实现。
* 请不要以任何方式,将本代码上传到可以公开访问的站点或仓库
*/
#include "cminusf_builder.hpp"
#define CONST_FP(num) ConstantFP::get((float)num, module.get())
......@@ -11,6 +16,22 @@ Type *INT32PTR_T;
Type *FLOAT_T;
Type *FLOATPTR_T;
bool promote(IRBuilder *builder, Value **l_val_p, Value **r_val_p) {
bool is_int = false;
auto &l_val = *l_val_p;
auto &r_val = *r_val_p;
if (l_val->get_type() == r_val->get_type()) {
is_int = l_val->get_type()->is_integer_type();
} else {
if (l_val->get_type()->is_integer_type()) {
l_val = builder->create_sitofp(l_val, FLOAT_T);
} else {
r_val = builder->create_sitofp(r_val, FLOAT_T);
}
}
return is_int;
}
/*
* use CMinusfBuilder::Scope to construct scopes
* scope.enter: enter a new scope
......@@ -19,7 +40,7 @@ Type *FLOATPTR_T;
* scope.find: find and return the value bound to the name
*/
Value* CminusfBuilder::visit(ASTProgram &node) {
Value *CminusfBuilder::visit(ASTProgram &node) {
VOID_T = module->get_void_type();
INT1_T = module->get_int1_type();
INT32_T = module->get_int32_type();
......@@ -34,145 +55,457 @@ Value* CminusfBuilder::visit(ASTProgram &node) {
return ret_val;
}
Value* CminusfBuilder::visit(ASTNum &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTNum &node) {
if (node.type == TYPE_INT) {
return CONST_INT(node.i_val);
}
return CONST_FP(node.f_val);
}
Value* CminusfBuilder::visit(ASTVarDeclaration &node) {
// TODO: This function is empty now.
// Add some code here.
Value *CminusfBuilder::visit(ASTVarDeclaration &node) {
Type *var_type = nullptr;
if (node.type == TYPE_INT) {
var_type = module->get_int32_type();
} else {
var_type = module->get_float_type();
}
if (node.num == nullptr) {
if (scope.in_global()) {
auto *initializer = ConstantZero::get(var_type, module.get());
auto *var = GlobalVariable::create(node.id, module.get(), var_type,
false, initializer);
scope.push(node.id, var);
} else {
auto *var = builder->create_alloca(var_type);
scope.push(node.id, var);
}
} else {
auto *array_type = ArrayType::get(var_type, node.num->i_val);
if (scope.in_global()) {
auto *initializer = ConstantZero::get(array_type, module.get());
auto *var = GlobalVariable::create(node.id, module.get(),
array_type, false, initializer);
scope.push(node.id, var);
} else {
auto *var = builder->create_alloca(array_type);
scope.push(node.id, var);
}
}
return nullptr;
}
Value* CminusfBuilder::visit(ASTFunDeclaration &node) {
FunctionType *fun_type;
Type *ret_type;
Value *CminusfBuilder::visit(ASTFunDeclaration &node) {
FunctionType *fun_type = nullptr;
Type *ret_type = nullptr;
std::vector<Type *> param_types;
if (node.type == TYPE_INT)
if (node.type == TYPE_INT) {
ret_type = INT32_T;
else if (node.type == TYPE_FLOAT)
} else if (node.type == TYPE_FLOAT) {
ret_type = FLOAT_T;
else
} else {
ret_type = VOID_T;
}
for (auto &param : node.params) {
// TODO: Please accomplish param_types.
if (param->type == TYPE_INT) {
if (param->isarray) {
param_types.push_back(INT32PTR_T);
} else {
param_types.push_back(INT32_T);
}
} else {
if (param->isarray) {
param_types.push_back(FLOATPTR_T);
} else {
param_types.push_back(FLOAT_T);
}
}
}
fun_type = FunctionType::get(ret_type, param_types);
auto func = Function::create(fun_type, node.id, module.get());
auto *func = Function::create(fun_type, node.id, module.get());
scope.push(node.id, func);
context.func = func;
auto funBB = BasicBlock::create(module.get(), "entry", func);
auto *funBB = BasicBlock::create(module.get(), "entry", func);
builder->set_insert_point(funBB);
scope.enter();
context.pre_enter_scope = true;
std::vector<Value *> args;
for (auto &arg : func->get_args()) {
args.push_back(&arg);
}
for (unsigned int i = 0; i < node.params.size(); ++i) {
// TODO: You need to deal with params and store them in the scope.
for (unsigned i = 0; i < node.params.size(); ++i) {
if (node.params[i]->isarray) {
Value *array_alloc = nullptr;
if (node.params[i]->type == TYPE_INT) {
array_alloc = builder->create_alloca(INT32PTR_T);
} else {
array_alloc = builder->create_alloca(FLOATPTR_T);
}
builder->create_store(args[i], array_alloc);
scope.push(node.params[i]->id, array_alloc);
} else {
Value *alloc = nullptr;
if (node.params[i]->type == TYPE_INT) {
alloc = builder->create_alloca(INT32_T);
} else {
alloc = builder->create_alloca(FLOAT_T);
}
builder->create_store(args[i], alloc);
scope.push(node.params[i]->id, alloc);
}
}
node.compound_stmt->accept(*this);
if (not builder->get_insert_block()->is_terminated())
{
if (context.func->get_return_type()->is_void_type())
// can't deal with return in both blocks
if (not builder->get_insert_block()->is_terminated()) {
if (context.func->get_return_type()->is_void_type()) {
builder->create_void_ret();
else if (context.func->get_return_type()->is_float_type())
} else if (context.func->get_return_type()->is_float_type()) {
builder->create_ret(CONST_FP(0.));
else
} else {
builder->create_ret(CONST_INT(0));
}
}
scope.exit();
return nullptr;
}
Value* CminusfBuilder::visit(ASTParam &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
}
Value *CminusfBuilder::visit(ASTParam &node) { return nullptr; }
Value *CminusfBuilder::visit(ASTCompoundStmt &node) {
bool need_exit_scope = !context.pre_enter_scope;
if (context.pre_enter_scope) {
context.pre_enter_scope = false;
} else {
scope.enter();
}
Value* CminusfBuilder::visit(ASTCompoundStmt &node) {
// TODO: This function is not complete.
// You may need to add some code here
// to deal with complex statements.
for (auto &decl : node.local_declarations) {
decl->accept(*this);
}
for (auto &stmt : node.statement_list) {
stmt->accept(*this);
if (builder->get_insert_block()->is_terminated())
if (builder->get_insert_block()->is_terminated()) {
break;
}
}
if (need_exit_scope) {
scope.exit();
}
return nullptr;
}
Value* CminusfBuilder::visit(ASTExpressionStmt &node) {
// TODO: This function is empty now.
// Add some code here.
Value *CminusfBuilder::visit(ASTExpressionStmt &node) {
if (node.expression != nullptr) {
return node.expression->accept(*this);
}
return nullptr;
}
Value* CminusfBuilder::visit(ASTSelectionStmt &node) {
// TODO: This function is empty now.
// Add some code here.
Value *CminusfBuilder::visit(ASTSelectionStmt &node) {
auto *ret_val = node.expression->accept(*this);
auto *trueBB = BasicBlock::create(module.get(), "", context.func);
BasicBlock *falseBB{};
auto *contBB = BasicBlock::create(module.get(), "", context.func);
Value *cond_val = nullptr;
if (ret_val->get_type()->is_integer_type()) {
cond_val = builder->create_icmp_ne(ret_val, CONST_INT(0));
} else {
cond_val = builder->create_fcmp_ne(ret_val, CONST_FP(0.));
}
if (node.else_statement == nullptr) {
builder->create_cond_br(cond_val, trueBB, contBB);
} else {
falseBB = BasicBlock::create(module.get(), "", context.func);
builder->create_cond_br(cond_val, trueBB, falseBB);
}
builder->set_insert_point(trueBB);
node.if_statement->accept(*this);
if (not builder->get_insert_block()->is_terminated()) {
builder->create_br(contBB);
}
if (node.else_statement == nullptr) {
// falseBB->erase_from_parent(); // did not clean up memory
} else {
builder->set_insert_point(falseBB);
node.else_statement->accept(*this);
if (not builder->get_insert_block()->is_terminated()) {
builder->create_br(contBB);
}
}
builder->set_insert_point(contBB);
return nullptr;
}
Value* CminusfBuilder::visit(ASTIterationStmt &node) {
// TODO: This function is empty now.
// Add some code here.
Value *CminusfBuilder::visit(ASTIterationStmt &node) {
auto *exprBB = BasicBlock::create(module.get(), "", context.func);
if (not builder->get_insert_block()->is_terminated()) {
builder->create_br(exprBB);
}
builder->set_insert_point(exprBB);
auto *ret_val = node.expression->accept(*this);
auto *trueBB = BasicBlock::create(module.get(), "", context.func);
auto *contBB = BasicBlock::create(module.get(), "", context.func);
Value *cond_val = nullptr;
if (ret_val->get_type()->is_integer_type()) {
cond_val = builder->create_icmp_ne(ret_val, CONST_INT(0));
} else {
cond_val = builder->create_fcmp_ne(ret_val, CONST_FP(0.));
}
builder->create_cond_br(cond_val, trueBB, contBB);
builder->set_insert_point(trueBB);
node.statement->accept(*this);
if (not builder->get_insert_block()->is_terminated()) {
builder->create_br(exprBB);
}
builder->set_insert_point(contBB);
return nullptr;
}
Value* CminusfBuilder::visit(ASTReturnStmt &node) {
Value *CminusfBuilder::visit(ASTReturnStmt &node) {
if (node.expression == nullptr) {
builder->create_void_ret();
return nullptr;
} else {
// TODO: The given code is incomplete.
// You need to solve other return cases (e.g. return an integer).
auto *fun_ret_type =
context.func->get_function_type()->get_return_type();
auto *ret_val = node.expression->accept(*this);
if (fun_ret_type != ret_val->get_type()) {
if (fun_ret_type->is_integer_type()) {
ret_val = builder->create_fptosi(ret_val, INT32_T);
} else {
ret_val = builder->create_sitofp(ret_val, FLOAT_T);
}
}
builder->create_ret(ret_val);
}
return nullptr;
}
Value* CminusfBuilder::visit(ASTVar &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTVar &node) {
auto *var = scope.find(node.id);
auto is_int =
var->get_type()->get_pointer_element_type()->is_integer_type();
auto is_float =
var->get_type()->get_pointer_element_type()->is_float_type();
auto is_ptr =
var->get_type()->get_pointer_element_type()->is_pointer_type();
bool should_return_lvalue = context.require_lvalue;
context.require_lvalue = false;
Value *ret_val = nullptr;
if (node.expression == nullptr) {
if (should_return_lvalue) {
ret_val = var;
context.require_lvalue = false;
} else {
if (is_int || is_float || is_ptr) {
ret_val = builder->create_load(var);
} else {
ret_val =
builder->create_gep(var, {CONST_INT(0), CONST_INT(0)});
}
}
} else {
auto *val = node.expression->accept(*this);
Value *is_neg = nullptr;
auto *exceptBB = BasicBlock::create(module.get(), "", context.func);
auto *contBB = BasicBlock::create(module.get(), "", context.func);
if (val->get_type()->is_float_type()) {
val = builder->create_fptosi(val, INT32_T);
}
is_neg = builder->create_icmp_lt(val, CONST_INT(0));
builder->create_cond_br(is_neg, exceptBB, contBB);
builder->set_insert_point(exceptBB);
auto *neg_idx_except_fun = scope.find("neg_idx_except");
builder->create_call(dynamic_cast<Function *>(neg_idx_except_fun), {});
if (context.func->get_return_type()->is_void_type()) {
builder->create_void_ret();
} else if (context.func->get_return_type()->is_float_type()) {
builder->create_ret(CONST_FP(0.));
} else {
builder->create_ret(CONST_INT(0));
}
builder->set_insert_point(contBB);
Value *tmp_ptr = nullptr;
if (is_int || is_float) {
tmp_ptr = builder->create_gep(var, {val});
} else if (is_ptr) {
auto *array_load = builder->create_load(var);
tmp_ptr = builder->create_gep(array_load, {val});
} else {
tmp_ptr = builder->create_gep(var, {CONST_INT(0), val});
}
if (should_return_lvalue) {
ret_val = tmp_ptr;
context.require_lvalue = false;
} else {
ret_val = builder->create_load(tmp_ptr);
}
}
return ret_val;
}
Value* CminusfBuilder::visit(ASTAssignExpression &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTAssignExpression &node) {
auto *expr_result = node.expression->accept(*this);
context.require_lvalue = true;
auto *var_addr = node.var->accept(*this);
if (var_addr->get_type()->get_pointer_element_type() !=
expr_result->get_type()) {
if (expr_result->get_type() == INT32_T) {
expr_result = builder->create_sitofp(expr_result, FLOAT_T);
} else {
expr_result = builder->create_fptosi(expr_result, INT32_T);
}
}
builder->create_store(expr_result, var_addr);
return expr_result;
}
Value* CminusfBuilder::visit(ASTSimpleExpression &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTSimpleExpression &node) {
if (node.additive_expression_r == nullptr) {
return node.additive_expression_l->accept(*this);
}
auto *l_val = node.additive_expression_l->accept(*this);
auto *r_val = node.additive_expression_r->accept(*this);
bool is_int = promote(&*builder, &l_val, &r_val);
Value *cmp = nullptr;
switch (node.op) {
case OP_LT:
if (is_int) {
cmp = builder->create_icmp_lt(l_val, r_val);
} else {
cmp = builder->create_fcmp_lt(l_val, r_val);
}
break;
case OP_LE:
if (is_int) {
cmp = builder->create_icmp_le(l_val, r_val);
} else {
cmp = builder->create_fcmp_le(l_val, r_val);
}
break;
case OP_GE:
if (is_int) {
cmp = builder->create_icmp_ge(l_val, r_val);
} else {
cmp = builder->create_fcmp_ge(l_val, r_val);
}
break;
case OP_GT:
if (is_int) {
cmp = builder->create_icmp_gt(l_val, r_val);
} else {
cmp = builder->create_fcmp_gt(l_val, r_val);
}
break;
case OP_EQ:
if (is_int) {
cmp = builder->create_icmp_eq(l_val, r_val);
} else {
cmp = builder->create_fcmp_eq(l_val, r_val);
}
break;
case OP_NEQ:
if (is_int) {
cmp = builder->create_icmp_ne(l_val, r_val);
} else {
cmp = builder->create_fcmp_ne(l_val, r_val);
}
break;
}
return builder->create_zext(cmp, INT32_T);
}
Value* CminusfBuilder::visit(ASTAdditiveExpression &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTAdditiveExpression &node) {
if (node.additive_expression == nullptr) {
return node.term->accept(*this);
}
auto *l_val = node.additive_expression->accept(*this);
auto *r_val = node.term->accept(*this);
bool is_int = promote(&*builder, &l_val, &r_val);
Value *ret_val = nullptr;
switch (node.op) {
case OP_PLUS:
if (is_int) {
ret_val = builder->create_iadd(l_val, r_val);
} else {
ret_val = builder->create_fadd(l_val, r_val);
}
break;
case OP_MINUS:
if (is_int) {
ret_val = builder->create_isub(l_val, r_val);
} else {
ret_val = builder->create_fsub(l_val, r_val);
}
break;
}
return ret_val;
}
Value* CminusfBuilder::visit(ASTTerm &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTTerm &node) {
if (node.term == nullptr) {
return node.factor->accept(*this);
}
auto *l_val = node.term->accept(*this);
auto *r_val = node.factor->accept(*this);
bool is_int = promote(&*builder, &l_val, &r_val);
Value *ret_val = nullptr;
switch (node.op) {
case OP_MUL:
if (is_int) {
ret_val = builder->create_imul(l_val, r_val);
} else {
ret_val = builder->create_fmul(l_val, r_val);
}
break;
case OP_DIV:
if (is_int) {
ret_val = builder->create_isdiv(l_val, r_val);
} else {
ret_val = builder->create_fdiv(l_val, r_val);
}
break;
}
return ret_val;
}
Value* CminusfBuilder::visit(ASTCall &node) {
// TODO: This function is empty now.
// Add some code here.
return nullptr;
Value *CminusfBuilder::visit(ASTCall &node) {
auto *func = dynamic_cast<Function *>(scope.find(node.id));
std::vector<Value *> args;
auto param_type = func->get_function_type()->param_begin();
for (auto &arg : node.args) {
auto *arg_val = arg->accept(*this);
if (!arg_val->get_type()->is_pointer_type() &&
*param_type != arg_val->get_type()) {
if (arg_val->get_type()->is_integer_type()) {
arg_val = builder->create_sitofp(arg_val, FLOAT_T);
} else {
arg_val = builder->create_fptosi(arg_val, INT32_T);
}
}
args.push_back(arg_val);
param_type++;
}
return builder->create_call(static_cast<Function *>(func), args);
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -34,6 +34,7 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
*/
if (_STR_EQ(n->name, "program")) {
auto node = new ASTProgram();
// flatten declaration list
std::stack<syntax_tree_node *>
s; // 为什么这里要用stack呢?如果用其他数据结构应该如何实现
......@@ -96,23 +97,34 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
// id 字段填充
node->id = n->children[1]->name;
/*
params 字段填充
注意这里的params是一个列表,每个元素都是一个ASTParam,需要flatten
params -> param-list | void
param-list -> param-list , param | param
*/
// TODO: 1.fill in the fields of ASTFunDeclaration
// 1.1 flatten params
// flatten params
std::stack<syntax_tree_node *> s;
auto list_ptr = n->children[3]->children[0];
if (list_ptr->children_num != 0) {
if (list_ptr->children_num == 3) {
while (list_ptr->children_num == 3) {
s.push(list_ptr->children[2]);
list_ptr = list_ptr->children[0];
}
}
s.push(list_ptr->children[0]);
// 1.2 compound_stmt 字段填充
while (!s.empty()) {
auto child_node = static_cast<ASTParam *>(transform_node_iter(s.top()));
auto child_node_shared = std::shared_ptr<ASTParam>(child_node);
node->params.push_back(child_node_shared);
s.pop();
}
}
auto stmt_node =
static_cast<ASTCompoundStmt *>(transform_node_iter(n->children[5]));
node->compound_stmt = std::shared_ptr<ASTCompoundStmt>(stmt_node);
return node;
} else if (_STR_EQ(n->name, "param")) {
// param -> type-specifier ID | type-specifier ID [ ]
// ASTParam的结构 主要需要填充的属性有 type, id, isarray
auto node = new ASTParam();
// type, id, isarray
if (_STR_EQ(n->children[0]->children[0]->name, "int"))
node->type = TYPE_INT;
else
......@@ -123,19 +135,41 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
return node;
} else if (_STR_EQ(n->name, "compound-stmt")) {
auto node = new ASTCompoundStmt();
// TODO: 2.fill in the fields of ASTCompoundStmt
/*
文法表达式如下
compound-stmt -> { local-declarations statement-list }
local-declarations -> local-declarations var-declaration | empty
statement-list -> statement-list statement | empty
*/
// local declarations
// 2.1 flatten local declarations
// statement list
// 2.2 flatten statement-list
if (n->children[1]->children_num == 2) {
// flatten local declarations
auto list_ptr = n->children[1];
std::stack<syntax_tree_node *> s;
while (list_ptr->children_num == 2) {
s.push(list_ptr->children[1]);
list_ptr = list_ptr->children[0];
}
while (!s.empty()) {
auto decl_node =
static_cast<ASTVarDeclaration *>(transform_node_iter(s.top()));
auto decl_node_ptr = std::shared_ptr<ASTVarDeclaration>(decl_node);
node->local_declarations.push_back(decl_node_ptr);
s.pop();
}
}
if (n->children[2]->children_num == 2) {
// flatten statement-list
auto list_ptr = n->children[2];
std::stack<syntax_tree_node *> s;
while (list_ptr->children_num == 2) {
s.push(list_ptr->children[1]);
list_ptr = list_ptr->children[0];
}
while (!s.empty()) {
auto stmt_node =
static_cast<ASTStatement *>(transform_node_iter(s.top()));
auto stmt_node_ptr = std::shared_ptr<ASTStatement>(stmt_node);
node->statement_list.push_back(stmt_node_ptr);
s.pop();
}
}
return node;
} else if (_STR_EQ(n->name, "statement")) {
return transform_node_iter(n->children[0]);
......@@ -151,18 +185,25 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
return node;
} else if (_STR_EQ(n->name, "selection-stmt")) {
auto node = new ASTSelectionStmt();
// TODO: 5.fill in the fields of ASTSelectionStmt
/*
selection-stmt -> if ( expression ) statement | if ( expression )
statement else statement ASTSelectionStmt的结构,需要填充的字段有
expression, if_statement, else_statement
*/
// 5.1 expresstion
// 5.2 if statement
auto expr_node =
static_cast<ASTExpression *>(transform_node_iter(n->children[2]));
auto expr_node_ptr = std::shared_ptr<ASTExpression>(expr_node);
node->expression = expr_node_ptr;
auto if_stmt_node =
static_cast<ASTStatement *>(transform_node_iter(n->children[4]));
auto if_stmt_node_ptr = std::shared_ptr<ASTStatement>(if_stmt_node);
node->if_statement = if_stmt_node_ptr;
// check whether this selection statement contains
// 5.3 else structure
// else structure
if (n->children_num == 7) {
auto else_stmt_node =
static_cast<ASTStatement *>(transform_node_iter(n->children[6]));
auto else_stmt_node_ptr = std::shared_ptr<ASTStatement>(else_stmt_node);
node->else_statement = else_stmt_node_ptr;
}
return node;
} else if (_STR_EQ(n->name, "iteration-stmt")) {
......@@ -242,13 +283,20 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
} else if (_STR_EQ(n->name, "additive-expression")) {
auto node = new ASTAdditiveExpression();
if (n->children_num == 3) {
// TODO: 4.fill in the fields of ASTAdditiveExpression
/*
文法表达式如下
additive-expression -> additive-expression addop term | term
*/
// additive_expression, term, op
auto add_expr_node = static_cast<ASTAdditiveExpression *>(
transform_node_iter(n->children[0]));
node->additive_expression =
std::shared_ptr<ASTAdditiveExpression>(add_expr_node);
auto op_name = n->children[1]->children[0]->name;
if (_STR_EQ(op_name, "+"))
node->op = OP_PLUS;
else if (_STR_EQ(op_name, "-"))
node->op = OP_MINUS;
auto term_node =
static_cast<ASTTerm *>(transform_node_iter(n->children[2]));
node->term = std::shared_ptr<ASTTerm>(term_node);
} else {
auto term_node =
static_cast<ASTTerm *>(transform_node_iter(n->children[0]));
......@@ -287,19 +335,12 @@ ASTNode *AST::transform_node_iter(syntax_tree_node *n) {
return transform_node_iter(n->children[i]);
else {
auto num_node = new ASTNum();
// TODO: 3.fill in the fields of ASTNum
/*
文法表达式如下
factor -> ( expression ) | var | call | integer | float
float -> FLOATPOINT
integer -> INTEGER
*/
if (_STR_EQ(name, "integer")) {
// 3.1
num_node->type = TYPE_INT;
num_node->i_val = std::stoi(n->children[i]->children[0]->name);
} else if (_STR_EQ(name, "float")) {
// 3.2
num_node->type = TYPE_FLOAT;
num_node->f_val = std::stof(n->children[i]->children[0]->name);
} else {
_AST_NODE_ERROR_
}
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
......@@ -25,6 +25,9 @@ void pass_node(char *text){
/* to do for students */
/* two cases for you, pass_node will send flex's token to bison */
\+ {pos_start = pos_end; pos_end += 1; pass_node(yytext); return ADD;}
/****请在此补全所有flex的模式与动作 end******/
\- {pos_start = pos_end; pos_end += 1; pass_node(yytext); return SUB;}
\* {pos_start = pos_end; pos_end += 1; pass_node(yytext); return MUL;}
\/ {pos_start = pos_end; pos_end += 1; pass_node(yytext); return DIV;}
......@@ -34,13 +37,34 @@ void pass_node(char *text){
\>= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return GTE;}
== {pos_start = pos_end; pos_end += 2; pass_node(yytext); return EQ;}
!= {pos_start = pos_end; pos_end += 2; pass_node(yytext); return NEQ;}
= {pos_start = pos_end; pos_end += 1; pass_node(yytext); return ASSIGN;}
= {pos_start = pos_end; pos_end += 1; pass_node(yytext); return ASSIN;}
; {pos_start = pos_end; pos_end += 1; pass_node(yytext); return SEMICOLON;}
, {pos_start = pos_end; pos_end += 1; pass_node(yytext); return COMMA;}
/* TODO: phase1. 请在这里补充其他的词法规则 */
\( {pos_start = pos_end; pos_end += 1; pass_node(yytext); return LPARENTHESE;}
\) {pos_start = pos_end; pos_end += 1; pass_node(yytext); return RPARENTHESE;}
\[ {pos_start = pos_end; pos_end += 1; pass_node(yytext); return LBRACKET;}
\] {pos_start = pos_end; pos_end += 1; pass_node(yytext); return RBRACKET;}
\{ {pos_start = pos_end; pos_end += 1; pass_node(yytext); return LBRACE;}
\} {pos_start = pos_end; pos_end += 1; pass_node(yytext); return RBRACE;}
else {pos_start = pos_end; pos_end += 4; pass_node(yytext); return ELSE;}
if {pos_start = pos_end; pos_end += 2; pass_node(yytext); return IF;}
int {pos_start = pos_end; pos_end += 3; pass_node(yytext); return INT;}
float {pos_start = pos_end; pos_end += 5; pass_node(yytext); return FLOAT;}
return {pos_start = pos_end; pos_end += 6; pass_node(yytext); return RETURN;}
void {pos_start = pos_end; pos_end += 4; pass_node(yytext); return VOID;}
while {pos_start = pos_end; pos_end += 5; pass_node(yytext); return WHILE;}
[a-zA-Z]+ {pos_start = pos_end; pos_end += strlen(yytext); pass_node(yytext); return IDENTIFIER;}
[0-9]+ {pos_start = pos_end; pos_end += strlen(yytext); pass_node(yytext); return INTEGER;}
[0-9]+\.[0-9]*|[0-9]*\.[0-9]+ { pos_start = pos_end; pos_end += strlen(yytext); pass_node(yytext); return FLOATPOINT;}
\n {lines++; pos_start = 1; pos_end = 1;}
[ \t] {pos_start = pos_end; pos_end += 1;}
"/*" { pos_start = pos_end; pos_end += 2; BEGIN(COMMENT); }
<COMMENT>"*/" { pos_start = pos_end; pos_end += 2; BEGIN(INITIAL); }
<COMMENT>. { pos_start = pos_end; pos_start += 1; }
<COMMENT>\n { pos_start = 1; pos_end = 1; lines++; }
. { pos_start = pos_end; pos_end++; return ERROR; }
/****请在此补全所有flex的模式与动作 end******/
%%
File mode changed from 100644 to 100755
......@@ -28,15 +28,13 @@ void yyerror(const char *s);
syntax_tree_node *node(const char *node_name, int children_num, ...);
%}
/* Complete this definition.
Hint: See pass_node(), node(), and syntax_tree.h.
Use forward declaring. */
/* TODO: Complete this definition. */
%union {
struct _syntax_tree_node * node;
char * name;
}
/* Your tokens here. */
/* TODO: Your tokens here. */
%token <node> ERROR
%token <node> ADD
%token <node> SUB
......@@ -48,7 +46,7 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
%token <node> GTE
%token <node> EQ
%token <node> NEQ
%token <node> ASSIGN
%token <node> ASSIN
%token <node> SEMICOLON
%token <node> COMMA
%token <node> LPARENTHESE
......@@ -65,8 +63,8 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
%token <node> WHILE
%token <node> IDENTIFIER
%token <node> INTEGER
%token <node> FLOAT // 这个token 对应float 关键字
%token <node> FLOATPOINT // 这个token 对应 浮点数值, 如果分不清的同学可以参考type-specifier的文法和对应产生式规则
%token <node> FLOAT
%token <node> FLOATPOINT // 这个是 float 类型的 token
//%token <node> EOL
//%token <node> BLANK
//%token <node> COMMENT
......@@ -76,7 +74,7 @@ syntax_tree_node *node(const char *node_name, int children_num, ...);
%start program
%%
/* Your rules here. TA has completed many */
/* TODO: Your rules here. */
program : declaration-list {$$ = node( "program", 1, $1); gt->root = $$;}
;
......@@ -122,8 +120,91 @@ local-declarations : local-declarations var-declaration {$$ = node( "local-dec
statement-list : statement-list statement {$$ = node( "statement-list", 2, $1, $2);}
| {$$ = node( "statement-list",0);}
;
// TODO: phase1. 补充其他的文法产生式逻辑
;
statement : expression-stmt {$$ = node( "statement", 1, $1);}
| compound-stmt {$$ = node( "statement", 1, $1);}
| selection-stmt {$$ = node( "statement", 1, $1);}
| iteration-stmt {$$ = node( "statement", 1, $1);}
| return-stmt {$$ = node( "statement", 1, $1);}
;
expression-stmt : expression SEMICOLON {$$ = node( "expression-stmt", 2, $1, $2);}
| SEMICOLON {$$ = node( "expression-stmt", 1, $1);}
;
selection-stmt : IF LPARENTHESE expression RPARENTHESE statement {$$ = node( "selection-stmt", 5, $1, $2, $3, $4, $5);}
| IF LPARENTHESE expression RPARENTHESE statement ELSE statement {$$ = node( "selection-stmt", 7, $1, $2, $3, $4, $5, $6, $7);}
;
iteration-stmt : WHILE LPARENTHESE expression RPARENTHESE statement {$$ = node( "iteration-stmt", 5, $1, $2, $3, $4, $5);}
;
return-stmt : RETURN SEMICOLON {$$ = node( "return-stmt", 2, $1, $2);}
| RETURN expression SEMICOLON {$$ = node( "return-stmt", 3, $1, $2, $3);}
;
expression : var ASSIN expression {$$ = node( "expression", 3, $1, $2, $3);}
| simple-expression {$$ = node( "expression", 1, $1);}
;
var : IDENTIFIER {$$ = node( "var", 1, $1);}
| IDENTIFIER LBRACKET expression RBRACKET {$$ = node( "var", 4, $1, $2, $3, $4);}
;
simple-expression : additive-expression relop additive-expression {$$ = node( "simple-expression", 3, $1, $2, $3);}
| additive-expression {$$ = node( "simple-expression", 1, $1);}
;
relop : LT {$$ = node( "relop", 1, $1);}
| LTE {$$ = node( "relop", 1, $1);}
| GT {$$ = node( "relop", 1, $1);}
| GTE {$$ = node( "relop", 1, $1);}
| EQ {$$ = node( "relop", 1, $1);}
| NEQ {$$ = node( "relop", 1, $1);}
;
additive-expression : additive-expression addop term {$$ = node( "additive-expression", 3, $1, $2, $3);}
| term {$$ = node( "additive-expression", 1, $1);}
;
addop : ADD {$$ = node( "addop", 1, $1);}
| SUB {$$ = node( "addop", 1, $1);}
;
term : term mulop factor {$$ = node( "term", 3, $1, $2, $3);}
| factor {$$ = node( "term", 1, $1);}
;
mulop : MUL {$$ = node( "mulop", 1, $1);}
| DIV {$$ = node( "mulop", 1, $1);}
;
factor : LPARENTHESE expression RPARENTHESE {$$ = node( "factor", 3, $1, $2, $3);}
| var {$$ = node( "factor", 1, $1);}
| call {$$ = node( "factor", 1, $1);}
| integer {$$ = node( "factor", 1, $1);}
| float {$$ = node( "factor", 1, $1);}
;
integer : INTEGER {$$ = node( "integer", 1, $1);}
;
float : FLOATPOINT {$$ = node( "float", 1, $1);}
;
call : IDENTIFIER LPARENTHESE args RPARENTHESE {$$ = node( "call", 4, $1, $2, $3, $4);}
;
args : arg-list {$$ = node( "args", 1, $1);}
| {$$ = node( "args", 0);}
;
arg-list : arg-list COMMA expression {$$ = node( "arg-list", 3, $1, $2, $3);}
| expression {$$ = node( "arg-list", 1, $1);}
;
%%
......@@ -164,7 +245,7 @@ syntax_tree_node *node(const char *name, int children_num, ...)
{
syntax_tree_node *p = new_syntax_tree_node(name);
syntax_tree_node *child;
// 这里表示 epsilon结点是通过 children_num == 0 来判断的
// 这里表示 epsilon结点是通过 children_num == 0 来判断的
if (children_num == 0) {
child = new_syntax_tree_node("epsilon");
syntax_tree_add_child(p, child);
......
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | >--* 0.0
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | >--* 1.
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | >--* .1
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* x
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* x
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | >--* /
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* x
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration
| | | | | >--+ var-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* int
| | | | | | >--* a
| | | | | | >--* ;
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* f
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--* void
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* g
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--* epsilon
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration-list
| | | | | >--+ declaration-list
| | | | | | >--+ declaration-list
| | | | | | | >--+ declaration
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* float
| | | | | | | | | >--* GVAR
| | | | | | | | | >--* ;
| | | | | | >--+ declaration
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* void
| | | | | | | | >--* NeverEverDeclareLikeThis
| | | | | | | | >--* ;
| | | | | >--+ declaration
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* GARRAY
| | | | | | | >--* [
| | | | | | | >--* 2333
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | >--+ declaration
| | | | | >--+ fun-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* void
| | | | | | >--* MyFuncA
| | | | | | >--* (
| | | | | | >--+ params
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param-list
| | | | | | | | | | >--+ param
| | | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | | >--* int
| | | | | | | | | | | >--* floatNum
| | | | | | | | | >--* ,
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* float
| | | | | | | | | | >--* intNum
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* void
| | | | | | | | | >--* voidNums
| | | | | | | | | >--* [
| | | | | | | | | >--* ]
| | | | | | >--* )
| | | | | | >--+ compound-stmt
| | | | | | | >--* {
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* IKnowYouAreVoid
| | | | | | | | | >--* ;
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ return-stmt
| | | | | | | | | | >--* return
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* MyFuncB
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* IKnowYouAreVoid
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--* }
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* float
| | | | | >--* MyFuncB
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--* void
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* IAmVoid
| | | | | | | | >--* [
| | | | | | | | >--* 0
| | | | | | | | >--* ]
| | | | | | | | >--* ;
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | >--* MyFuncA
| | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | | | | >--* .0
| | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* IAmVoid
| | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* a
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* b
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* c
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* a
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* b
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* c
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 85
| | | | | | | | | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | | | | | | | | >--* ==
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 84
| | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | | | >--* 0.4
| | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* b
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* GARRAY
| | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* MyFuncB
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* GARRAY
| | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* c
| | | | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1.
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* .1
| | | | | | | | | | | | | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | | | | | | | | | | | | >--* ==
| | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1.1
| | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | | | | >--* else
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | >--* if
| | | | | | | | | | | >--* (
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* MyFuncC
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | >--* NotDeclared
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | >--* )
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--* }
| | | | | | | | | | | >--* else
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | >--* 0.
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ expression-stmt
| | | | | | | | >--+ expression
| | | | | | | | | >--+ var
| | | | | | | | | | >--* a
| | | | | | | | | >--* =
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* b
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* c
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | >--* /
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | >--* /
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 4
| | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* gcd
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param-list
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* u
| | | | | | | >--* ,
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* v
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* ==
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 0
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | >--* return
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | >--* ;
| | | | | | | | | >--* else
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | >--* return
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* gcd
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | | | >--* /
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* x
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* y
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* temp
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 72
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* y
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 18
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ selection-stmt
| | | | | | | | | | >--* if
| | | | | | | | | | >--* (
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | >--* <
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | >--* )
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | >--* {
| | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* temp
| | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* temp
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--* }
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | >--* gcd
| | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration
| | | | | >--+ fun-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* void
| | | | | | >--* move
| | | | | | >--* (
| | | | | | >--+ params
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* x
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* y
| | | | | | >--* )
| | | | | | >--+ compound-stmt
| | | | | | | >--* {
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | >--* putint
| | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | >--* putch
| | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 32
| | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | >--* putint
| | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* putch
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 44
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* putch
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 32
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--* }
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* void
| | | | | >--* hanoi
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param-list
| | | | | | | | | | >--+ param
| | | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | | >--* int
| | | | | | | | | | | >--* n
| | | | | | | | | >--* ,
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* one
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* two
| | | | | | | >--* ,
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* three
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* ==
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 1
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* move
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* one
| | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | >--* three
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | >--* ;
| | | | | | | | | >--* else
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | >--* hanoi
| | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* one
| | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* three
| | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* two
| | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | >--* move
| | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* one
| | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* three
| | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | >--* hanoi
| | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* two
| | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* one
| | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* three
| | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* n
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* n
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* getint
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* >
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 0
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | >--* hanoi
| | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* getint
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | >--* putch
| | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* n
| | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 1
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--* }
| | | | | | | | | >--* else
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | >--* if
| | | | | | | | | | | >--* (
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | >--* )
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--* }
| | | | | | | | | | | >--* else
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration-list
| | | | | >--+ declaration
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* x
| | | | | | | >--* [
| | | | | | | >--* 10
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | >--+ declaration
| | | | | >--+ fun-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* int
| | | | | | >--* minloc
| | | | | | >--* (
| | | | | | >--+ params
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param-list
| | | | | | | | | | >--+ param
| | | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | | >--* int
| | | | | | | | | | | >--* a
| | | | | | | | | | | >--* [
| | | | | | | | | | | >--* ]
| | | | | | | | | >--* ,
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* low
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* high
| | | | | | >--* )
| | | | | | >--+ compound-stmt
| | | | | | | >--* {
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--+ local-declarations
| | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ var-declaration
| | | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | | >--* int
| | | | | | | | | | | >--* i
| | | | | | | | | | | >--* ;
| | | | | | | | | >--+ var-declaration
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* x
| | | | | | | | | | >--* ;
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* k
| | | | | | | | | >--* ;
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* low
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* low
| | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* low
| | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ iteration-stmt
| | | | | | | | | | | >--* while
| | | | | | | | | | | >--* (
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | >--* <
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* high
| | | | | | | | | | | >--* )
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | | | | | | | >--* if
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | | | | | | | >--* <
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | | | | | >--* }
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--* }
| | | | | | | | >--+ statement
| | | | | | | | | >--+ return-stmt
| | | | | | | | | | >--* return
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | >--* ;
| | | | | | | >--* }
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* void
| | | | | >--* sort
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* a
| | | | | | | | | | >--* [
| | | | | | | | | | >--* ]
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* low
| | | | | | | >--* ,
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* high
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* i
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* k
| | | | | | | | >--* ;
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* i
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* low
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* <
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* high
| | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | >--* -
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 1
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ var-declaration
| | | | | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | | | | >--* int
| | | | | | | | | | | | | >--* t
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | | >--* minloc
| | | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* high
| | | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* t
| | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* k
| | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* t
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* i
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ iteration-stmt
| | | | | | | | | | | >--* while
| | | | | | | | | | | >--* (
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | >--* <
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | | >--* )
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | >--* input
| | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--* }
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* sort
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* i
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ iteration-stmt
| | | | | | | | >--* while
| | | | | | | | >--* (
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* i
| | | | | | | | | | >--+ relop
| | | | | | | | | | | >--* <
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 10
| | | | | | | | >--* )
| | | | | | | | >--+ statement
| | | | | | | | | >--+ compound-stmt
| | | | | | | | | | >--* {
| | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | >--* output
| | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | >--* }
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* array
| | | | | | | >--* [
| | | | | | | >--* 1
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* array
| | | | | | | | | | | >--* [
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | >--* ]
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* float
| | | | | >--* foo
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param-list
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* float
| | | | | | | | | >--* a
| | | | | | | >--* ,
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* float
| | | | | | | | >--* b
| | | | | | | | >--* [
| | | | | | | | >--* ]
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 1
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* b
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--* epsilon
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* b
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* !=
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* b
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | | | | >--* if
| | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | | | | >--* ==
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--* else
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | | >--* }
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* i
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* float
| | | | | | | | >--* j
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* void
| | | | | | | >--* v
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 0
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* arr
| | | | | | | | | >--* [
| | | | | | | | | >--* 100
| | | | | | | | | >--* ]
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* i
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* sum
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* sum
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ iteration-stmt
| | | | | | | | | | >--* while
| | | | | | | | | | >--* (
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* getint
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* )
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | >--* {
| | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* arr
| | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | >--* getint
| | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--* }
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* sum
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* sum
| | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* arr
| | | | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* sum
| | | | | | | | | | | >--+ addop
| | | | | | | | | | | | >--* -
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | >--* 79
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* void
| | | | | >--* test
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* a
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | >--* test
| | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* addone
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | >--* +
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 1
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* result
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* result
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* addone
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | >--* addone
| | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* addone
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* addone
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1230
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* result
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* factorial
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | >--+ relop
| | | | | | | | | | | | >--* ==
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | >--* 0
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | >--* return
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | >--* ;
| | | | | | | | | >--* else
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | >--* return
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | >--* factorial
| | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* result
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* result
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* factorial
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* result
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--* epsilon
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ selection-stmt
| | | | | | | | | | >--* if
| | | | | | | | | | >--* (
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | >--* )
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 4
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* i
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* i
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* i
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* b
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* b
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* i
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | | | | >--* if
| | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | | | | >--* <
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 5
| | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--* else
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | | >--* }
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | >--+ addop
| | | | | | | | | | | | >--* +
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* b
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* a
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* b
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* c
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* c
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* b
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ selection-stmt
| | | | | | | | | >--* if
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* b
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ selection-stmt
| | | | | | | | | | | >--* if
| | | | | | | | | | | >--* (
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* c
| | | | | | | | | | | >--* )
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 4
| | | | | | | | | | | | | >--* ;
| | | | | | | | | | | >--* else
| | | | | | | | | | | >--+ statement
| | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* i
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* j
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* i
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ iteration-stmt
| | | | | | | | | >--* while
| | | | | | | | | >--* (
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | >--* )
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | >--* {
| | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* j
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | >--+ iteration-stmt
| | | | | | | | | | | | | | >--* while
| | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | >--* j
| | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | | | | | >--* {
| | | | | | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | >--* j
| | | | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* j
| | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | | | >--* }
| | | | | | | | | | | >--* }
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* i
| | | | | | | | | | | >--+ addop
| | | | | | | | | | | | >--* +
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* j
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration
| | | | >--+ var-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* a
| | | | | >--* ;
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration
| | | | | >--+ var-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* int
| | | | | | >--* a
| | | | | | >--* ;
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* void
| | | | | >--* GlobalAssign
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--* void
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* a
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 10
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | >--* GlobalAssign
| | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 20
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration-list
| | | >--+ declaration-list
| | | | >--+ declaration-list
| | | | | >--+ declaration-list
| | | | | | >--+ declaration
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* x
| | | | | | | | >--* [
| | | | | | | | >--* 1
| | | | | | | | >--* ]
| | | | | | | | >--* ;
| | | | | >--+ declaration
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* y
| | | | | | | >--* [
| | | | | | | >--* 1
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | >--+ declaration
| | | | | >--+ fun-declaration
| | | | | | >--+ type-specifier
| | | | | | | >--* int
| | | | | | >--* gcd
| | | | | | >--* (
| | | | | | >--+ params
| | | | | | | >--+ param-list
| | | | | | | | >--+ param-list
| | | | | | | | | >--+ param
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* u
| | | | | | | | >--* ,
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* v
| | | | | | >--* )
| | | | | | >--+ compound-stmt
| | | | | | | >--* {
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ selection-stmt
| | | | | | | | | | >--* if
| | | | | | | | | | >--* (
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | >--* ==
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | >--* )
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | | >--* return
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | >--* ;
| | | | | | | | | | >--* else
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ return-stmt
| | | | | | | | | | | | >--* return
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | | | | >--* gcd
| | | | | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | | | | | | | | | | | >--* -
| | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* /
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | | | | | | | >--+ mulop
| | | | | | | | | | | | | | | | | | | | | | | | | >--* *
| | | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | >--* )
| | | | | | | | | | | | >--* ;
| | | | | | | >--* }
| | | >--+ declaration
| | | | >--+ fun-declaration
| | | | | >--+ type-specifier
| | | | | | >--* int
| | | | | >--* funArray
| | | | | >--* (
| | | | | >--+ params
| | | | | | >--+ param-list
| | | | | | | >--+ param-list
| | | | | | | | >--+ param
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* u
| | | | | | | | | >--* [
| | | | | | | | | >--* ]
| | | | | | | >--* ,
| | | | | | | >--+ param
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* v
| | | | | | | | >--* [
| | | | | | | | >--* ]
| | | | | >--* )
| | | | | >--+ compound-stmt
| | | | | | >--* {
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--+ local-declarations
| | | | | | | | | >--+ local-declarations
| | | | | | | | | | >--* epsilon
| | | | | | | | | >--+ var-declaration
| | | | | | | | | | >--+ type-specifier
| | | | | | | | | | | >--* int
| | | | | | | | | | >--* a
| | | | | | | | | | >--* ;
| | | | | | | | >--+ var-declaration
| | | | | | | | | >--+ type-specifier
| | | | | | | | | | >--* int
| | | | | | | | | >--* b
| | | | | | | | | >--* ;
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* temp
| | | | | | | | >--* ;
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--+ statement-list
| | | | | | | | | | >--+ statement-list
| | | | | | | | | | | >--* epsilon
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* u
| | | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | | >--* ;
| | | | | | | | | >--+ statement
| | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | >--* b
| | | | | | | | | | | | >--* =
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* v
| | | | | | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | | | | | | | >--* ]
| | | | | | | | | | | >--* ;
| | | | | | | | >--+ statement
| | | | | | | | | >--+ selection-stmt
| | | | | | | | | | >--* if
| | | | | | | | | | >--* (
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | >--* <
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | >--* )
| | | | | | | | | | >--+ statement
| | | | | | | | | | | >--+ compound-stmt
| | | | | | | | | | | | >--* {
| | | | | | | | | | | | >--+ local-declarations
| | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | >--+ statement-list
| | | | | | | | | | | | | | | | >--* epsilon
| | | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | >--* temp
| | | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | | >--+ statement
| | | | | | | | | | | | | | >--+ expression-stmt
| | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | | >--* =
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* temp
| | | | | | | | | | | | | | | >--* ;
| | | | | | | | | | | | >--* }
| | | | | | | >--+ statement
| | | | | | | | >--+ return-stmt
| | | | | | | | | >--* return
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | | >--* gcd
| | | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* b
| | | | | | | | | | | | | | | >--* )
| | | | | | | | | >--* ;
| | | | | | >--* }
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* x
| | | | | | | | | | | | >--* [
| | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | | >--* ]
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 90
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* y
| | | | | | | | | | | >--* [
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 0
| | | | | | | | | | | >--* ]
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 18
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ call
| | | | | | | | | | | | | | >--* funArray
| | | | | | | | | | | | | | >--* (
| | | | | | | | | | | | | | >--+ args
| | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | >--+ arg-list
| | | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | | >--* x
| | | | | | | | | | | | | | | | >--* ,
| | | | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | | | | | | | | >--* y
| | | | | | | | | | | | | | >--* )
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--* epsilon
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* float
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* [
| | | | | | | >--* 10
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* void
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* float
| | | | | | | >--* a
| | | | | | | >--* [
| | | | | | | >--* 10
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--* epsilon
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1000
| | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 234
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 1234
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--* epsilon
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* a
| | | | | | | >--* [
| | | | | | | >--* 10
| | | | | | | >--* ]
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--* epsilon
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* a
| | | | | | | | | | | >--* [
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | >--* ]
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | >--* 1234
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* a
| | | | | | | | | | | | | | >--* [
| | | | | | | | | | | | | | >--+ expression
| | | | | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | | | | | >--* ]
| | | | | | | | >--* ;
| | | | | >--* }
>--+ program
| >--+ declaration-list
| | >--+ declaration
| | | >--+ fun-declaration
| | | | >--+ type-specifier
| | | | | >--* int
| | | | >--* main
| | | | >--* (
| | | | >--+ params
| | | | | >--* void
| | | | >--* )
| | | | >--+ compound-stmt
| | | | | >--* {
| | | | | >--+ local-declarations
| | | | | | >--+ local-declarations
| | | | | | | >--+ local-declarations
| | | | | | | | >--* epsilon
| | | | | | | >--+ var-declaration
| | | | | | | | >--+ type-specifier
| | | | | | | | | >--* int
| | | | | | | | >--* a
| | | | | | | | >--* ;
| | | | | | >--+ var-declaration
| | | | | | | >--+ type-specifier
| | | | | | | | >--* int
| | | | | | | >--* b
| | | | | | | >--* ;
| | | | | >--+ statement-list
| | | | | | >--+ statement-list
| | | | | | | >--+ statement-list
| | | | | | | | >--+ statement-list
| | | | | | | | | >--* epsilon
| | | | | | | | >--+ statement
| | | | | | | | | >--+ expression-stmt
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ var
| | | | | | | | | | | | >--* a
| | | | | | | | | | | >--* =
| | | | | | | | | | | >--+ expression
| | | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 1
| | | | | | | | | | | | | >--+ relop
| | | | | | | | | | | | | | >--* <
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 3
| | | | | | | | | | >--* ;
| | | | | | | >--+ statement
| | | | | | | | >--+ expression-stmt
| | | | | | | | | >--+ expression
| | | | | | | | | | >--+ var
| | | | | | | | | | | >--* b
| | | | | | | | | | >--* =
| | | | | | | | | | >--+ expression
| | | | | | | | | | | >--+ simple-expression
| | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | | >--+ integer
| | | | | | | | | | | | | | | | | >--* 2
| | | | | | | | | | | | | >--+ addop
| | | | | | | | | | | | | | >--* +
| | | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | | >--+ float
| | | | | | | | | | | | | | | | >--* 2.4
| | | | | | | | | >--* ;
| | | | | | >--+ statement
| | | | | | | >--+ return-stmt
| | | | | | | | >--* return
| | | | | | | | >--+ expression
| | | | | | | | | >--+ simple-expression
| | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | >--+ additive-expression
| | | | | | | | | | | | >--+ term
| | | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | | >--* a
| | | | | | | | | | | >--+ addop
| | | | | | | | | | | | >--* +
| | | | | | | | | | | >--+ term
| | | | | | | | | | | | >--+ factor
| | | | | | | | | | | | | >--+ var
| | | | | | | | | | | | | | >--* b
| | | | | | | | >--* ;
| | | | | >--* }
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
; ModuleID = 'cminus'
source_filename = "/jhe/2024ustc-jianmu-compiler_impl/tests/2-ir-gen/autogen/testcases/lv0_1/decl_float_array.cminus"
declare i32 @input()
declare void @output(i32)
declare void @outputFloat(float)
declare void @neg_idx_except()
define void @main() {
label_entry:
%op0 = alloca [10 x float]
ret void
}
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment