public WhileNode(GenKeeper keeper, ITerminalNode terminal, IExprNode condition, IExprNode prog, IExprNode elseProg) : base(keeper, terminal) { _condition = condition; _prog = prog; _elseProg = elseProg; }
public FieldNode(GenKeeper keeper, ITerminalNode terminal) : base(keeper, terminal) { if (terminal != null) { _field = terminal.Symbol.Text; } }
public VarSetNode(GenKeeper keeper, ITerminalNode terminal, IExprNode nodeMean) : base(keeper, terminal) { var name = terminal.Symbol.Text; _var = keeper.Vars.Add(name, new Var(name)); _nodeMean = nodeMean; }
public NodeRTabl(GenKeeper keeper, ITerminalNode terminal, IExprNode condition) : base(keeper, terminal) { if (terminal != null) { _tablName = terminal.Symbol.Text; } _condition = condition; }
public VarNode(GenKeeper keeper, ITerminalNode terminal) : base(keeper, terminal) { var name = terminal.Symbol.Text; if (!keeper.Vars.ContainsKey(name)) { AddError("Использование неприсвоеной переменной"); } else { _var = keeper.Vars[name]; } }
public GenBaseRow(ModuleGenerator generator, //Ссылка на генератор GenTemplateTable table, //Описание полей таблицы-шаблона DaoRec rec) //Рекордсет таблицы шаблона генерации { Table = table; Keeper = new GenKeeper(generator); RuleString = rec.GetString(Table.RuleField); if (!RuleString.IsEmpty()) { var parse = Table.IsSub ? new SubRuleParsing(Keeper, Table.RuleField, RuleString) : new RuleParsing(Keeper, Table.RuleField, RuleString); Rule = parse.ResultTree; } foreach (Field field in rec.Recordset.Fields) { var name = field.Name; if (!Table.IsSpecial(name) && !rec.IsNull(name)) { var dataType = field.Type.ToDataType(); if (dataType != DataType.String) { Fields.Add(name, new GenConstNode(rec.GetMean(dataType, name))); } else { string s = rec.GetString(name); if (!s.Contains("[")) { Fields.Add(name, new GenConstNode(null, s)); } else { var fparse = new FieldsParsing(Keeper, name, rec.GetString(name)); var f = (IExprNode)fparse.ResultTree; if (f != null) { Fields.Add(name, f); } } } } } }
public NodeIfVoid(GenKeeper keeper, ITerminalNode terminal, List <IExprNode> conditions, List <IVoidNode> variants) : base(keeper, terminal) { _conditions = conditions; _variants = variants; }
public FunNode(GenKeeper keeper, ITerminalNode terminal, //Имя функции ListNode argsList) //Узел с аргументами : base(keeper, terminal) { _args = argsList.Nodes.Cast <IExprNode>().ToArray(); }
public NodeWhileVoid(GenKeeper keeper, ITerminalNode terminal, IExprNode condition, IVoidNode prog) : base(keeper, terminal) { _condition = condition; _prog = prog; }
public SubRuleParsing(GenKeeper keeper, string fieldName, string fieldValue) : base(keeper, fieldName, fieldValue + Environment.NewLine) { }
public FunNode(GenKeeper keeper, ITerminalNode terminal, //Имя функции params IExprNode[] args) //Аргументы : base(keeper, terminal) { _args = args; }
public SubNodeR(GenKeeper keeper, ITerminalNode terminal, IExprNode condition) : base(keeper, terminal) { Condition = condition; }
public FieldsParsing(GenKeeper keeper, string fieldName, string fieldValue) : base(keeper, fieldName, fieldValue) { }
public RuleVisitor(GenKeeper keeper) { _keeper = keeper; }
public GroupNodeR(GenKeeper keeper, ITerminalNode terminal, IEnumerable <INode> fieldsNodes) : base(keeper, terminal) { _fieldsNodes = (fieldsNodes ?? new INode[0]).ToArray(); _fields = _fieldsNodes.Select(node => node.Token.Text).ToArray(); }
public FieldsVisitor(GenKeeper keeper) { _keeper = keeper; }
protected KeeperNode(GenKeeper keeper, ITerminalNode terminal) : base(terminal) { Keeper = keeper; }
public SubNode(GenKeeper keeper, ITerminalNode terminal, IEnumerable <IExprNode> pars) //Параметры, смысл каждого параметра определяется при проверке : base(keeper, terminal) { _pars = pars.ToArray(); }
public OverNode(GenKeeper keeper, ITerminalNode terminal, IExprNode expr) : base(keeper, terminal) { _expr = expr; }
public OverVoidNode(GenKeeper keeper, ITerminalNode terminal, IVoidNode prog) : base(keeper, terminal) { _prog = prog; }