Example #1
0
        private IDeclarationList Declarations()
        {
            IDeclarationList declarations = ImplementationFactory.CreateDeclarationList();
            PqlToken         declarationType;

            while (currentToken.Type != PqlTokenType.SELECT)
            {
                switch (currentToken.Type)
                {
                case PqlTokenType.PROCEDURE:
                case PqlTokenType.STMTLST:
                case PqlTokenType.STMT:
                case PqlTokenType.ASSIGN:
                case PqlTokenType.CALL:
                case PqlTokenType.WHILE:
                case PqlTokenType.IF:
                case PqlTokenType.VARIABLE:
                case PqlTokenType.CONSTANT:
                case PqlTokenType.PROG_LINE:
                    declarationType = currentToken;
                    Eat(currentToken.Type);
                    while (currentToken.Type != PqlTokenType.SEMI)
                    {
                        declarations.AddDeclaration(Declaration(declarationType));
                    }
                    Eat(PqlTokenType.SEMI);
                    break;

                default:
                    throw new Exception();
                }
            }

            return(declarations);
        }
Example #2
0
 public PqlTupleOutput()
 {
     Declarations = ImplementationFactory.CreateDeclarationList();
 }
Example #3
0
 public override IEntityList CreateNewList()
 {
     return(ImplementationFactory.CreateDeclarationList());
 }