Package org.destecs.core.parsers.dcl

Examples of org.destecs.core.parsers.dcl.ScriptParser


      throws IOException
  {
    super.lexer = new ScriptLexer(data);
    final CommonTokenStream tokens = new CommonTokenStream(lexer);

    ScriptParser thisParser = new ScriptParser(tokens);
    parser = thisParser;

    ((ScriptLexer) lexer).enableErrorMessageCollection(true);
    thisParser.enableErrorMessageCollection(true);

    try
    {
      List<INode> toplevel = thisParser.root();

      if (((ScriptLexer) lexer).hasExceptions())
      {
        List<RecognitionException> exps = ((ScriptLexer) lexer).getExceptions();
        addErrorsLexer(source, exps);
        return null;
      }

      if (thisParser.hasExceptions())
      {
        List<RecognitionException> exps = thisParser.getExceptions();
        addErrorsParser(source, exps);
      }

      return toplevel;
    } catch (RecognitionException errEx)
View Full Code Here

TOP

Related Classes of org.destecs.core.parsers.dcl.ScriptParser

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.