Package st.redline.compiler.ast

Examples of st.redline.compiler.ast.Program


        this.analyserFactory = analyserFactory;
    }

    public byte[] compile(Source source) {
        String preprocessedSource = preprocess(source);
        Program rootAstNode = parse(preprocessedSource, source.name());
        Analyser analyser = createAnalyser(rootAstNode, source);
        return analyser.analyse();
    }
View Full Code Here


    public Program parse(String preprocessedSource, String className) {
        SmalltalkLexer smalltalkLexer = lexorOn(preprocessedSource);
        SmalltalkParser smalltalkParser = parserUsing(smalltalkLexer);
        try {
            Program program = smalltalkParser.program();
            if (!ignoreParseErrors && smalltalkParser.getNumberOfSyntaxErrors() > 0)
                throw new RuntimeException("Smalltalk Syntax error(s) detected in '" + className + "'.");
            return program;
        } catch (RecognitionException e) {
            throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of st.redline.compiler.ast.Program

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.