Exemplo n.º 1
0
        public void LoadArgs(IProgramKnowledgeBase pkb, IDeclarationList declarations)
        {
            PqlDeclaration declaration = declarations.GetDeclarationBySynonym(Synonym.Name);

            Args          = declaration.EntityList;
            Args.ListName = Synonym.Name;
            Type          = declaration.DesignEntity.Type;
        }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
        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;
            }
        }
Exemplo n.º 4
0
 public PqlParentT(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef) : base(relationType, leftRef, rightRef)
 {
 }
Exemplo n.º 5
0
 public PqlFollows(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef) : base(relationType, leftRef, rightRef)
 {
 }
Exemplo n.º 6
0
 public PqlRelation(PqlTokenType relationType, PqlArgument leftRef, PqlArgument rightRef)
 {
     RelationType = relationType;
     LeftRef      = leftRef;
     RightRef     = rightRef;
 }
Exemplo n.º 7
0
 public PqlToken(PqlTokenType type, object value)
 {
     Type  = type;
     Value = value;
 }