public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations) { PqlDeclaration declaration = declarations.GetDeclarationBySynonym(Synonym.Name); Args = declaration.EntityList; Args.ListName = Synonym.Name; Type = declaration.DesignEntity.Type; }
private void Eat(PqlTokenType type) { if (currentToken.Type == type) { currentToken = lexer.GetNextToken(); } else { //throw new PqlParserException("Niespodziewany token. Spodziewany: " + type.ToString() + " Rzeczywisty: " + currentToken.Type.ToString(), lexer.lineCounter, lexer.rowCounter); } }
public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations) { PqlDeclaration declaration = declarations.GetDeclarationBySynonym(LeftRef.SynonymName); LeftArgs = declaration.EntityList; LeftArgs.ListName = LeftRef.SynonymName; LeftType = declaration.DesignEntity.Type; if (RightRef is PqlInteger || RightRef is PqlString) { RightArgs = LoadSingleRightArg(pkb); } else { string synonym = RightRef is PqlAttrRef ? (RightRef as PqlAttrRef).SynonymName : (RightRef as PqlSynonym).Name; declaration = declarations.GetDeclarationBySynonym(synonym); RightArgs = declaration.EntityList; RightArgs.ListName = synonym; RightType = declaration.DesignEntity.Type; } }
public PqlParentT(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef) : base(relationType, leftRef, rightRef) { }
public PqlFollows(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef) : base(relationType, leftRef, rightRef) { }
public PqlRelation(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef) { RelationType = relationType; LeftRef = leftRef; RightRef = rightRef; }
public PqlToken(PqlTokenType type, object value) { Type = type; Value = value; }