Class AbstractModule

All Implemented Interfaces:
IModule, ModuleElement
Direct Known Subclasses:
EolModule

public abstract class AbstractModule extends AbstractModuleElement implements IModule
  • Field Details

  • Constructor Details

    • AbstractModule

      public AbstractModule()
  • Method Details

    • getMainRule

      public abstract String getMainRule()
    • createLexer

      protected abstract org.antlr.runtime.Lexer createLexer(org.antlr.runtime.ANTLRInputStream inputStream)
    • createParser

      public abstract EpsilonParser createParser(org.antlr.runtime.TokenStream tokenStream)
    • getSourceFile

      public File getSourceFile()
    • getSourceUri

      public URI getSourceUri()
      Specified by:
      getSourceUri in interface IModule
    • getParseProblems

      public List<ParseProblem> getParseProblems()
      Specified by:
      getParseProblems in interface IModule
    • parse

      public boolean parse(String code, File file) throws Exception
      Specified by:
      parse in interface IModule
      Throws:
      Exception
    • parse

      public boolean parse(URI uri) throws Exception
      Specified by:
      parse in interface IModule
      Throws:
      Exception
    • invokeMainRule

      protected boolean invokeMainRule(List<org.antlr.runtime.CommonToken> comments) throws Exception
      Throws:
      Exception
    • createAst

      public ModuleElement createAst(AST cst, ModuleElement parentAst)
      Specified by:
      createAst in interface IModule
    • adapt

      public abstract ModuleElement adapt(AST cst, ModuleElement parentAst)
    • extractComments

      protected List<org.antlr.runtime.CommonToken> extractComments(org.antlr.runtime.CommonTokenStream stream)
    • assignComments

      protected void assignComments(AST root, List<org.antlr.runtime.CommonToken> comments)
    • assignComment

      protected void assignComment(AST root, org.antlr.runtime.CommonToken comment)
    • assignAnnotations

      protected void assignAnnotations(AST ast)