Package bm.vm.lang

Examples of bm.vm.lang.Block


        }
        else
        {
            argClasses = null;
        }
        body = new Block();
        body.setMethod( this );
        body.deserialize( in );
    }
View Full Code Here


                );
            }

            command.setCondition( compiler.parseExpression( ")" ) );
            parser.searchNext( '{' );
            final Block body = new Block();
            final BlockKeyword keyword = new BlockKeyword();
            keyword.parse( compiler, parser, body );
            command.setIfBranch( body );

            String token = parser.next( ClassCompiler.WS + "{}", false, true, true );
            if( token == null )
            {
                throw new CompilerException(
                        "Error reading file",
                        parser.getStartLine(),
                        parser.getStartChar()
                );
            }
            else if( token.equals( "else" ) )
            {
                parser.searchNext( '{' );
                final Block elseBody = new Block();
                final BlockKeyword elsekKeyword = new BlockKeyword();
                elsekKeyword.parse( compiler, parser, elseBody );
                command.setElseBranch( elseBody );
            }
            else
View Full Code Here

            final StreamParser  parser,
            final Block         parent
    )
            throws CompilerException
    {
        final Block block = new Block();
        while( true )
        {
            String token;
            try
            {
                token = parser.next( ClassCompiler.WS + "(", false, true, true );
            }
            catch( ParserException e )
            {
                throw new CompilerException( e );
            }
            if( token == null )
            {
                throw new CompilerException(
                        "Unexpected end of file",
                        parser.getStartLine(),
                        parser.getStartChar()
                );
            }
            if( token.equals( "}" ) )
            {
                parent.add( block );
                return;
            }
            else
            {
                final Keyword keyword = compiler.getKeyword( token );
                if( keyword != null )
                {
                    keyword.parse( compiler, parser, block );
                }
                else
                {
                    parser.pushback( token );
                    block.add( compiler.parseExpression( ";" ) );
                }
            }
        }
    }
View Full Code Here

                );
            }

            command.setCondition( compiler.parseExpression( ")" ) );
            parser.searchNext( '{' );
            final Block body = new Block();

            final BlockKeyword keyword = new BlockKeyword();
            keyword.parse( compiler, parser, body );

            command.setBody( body );
View Full Code Here

TOP

Related Classes of bm.vm.lang.Block

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.