Class ParserGenerator

java.lang.Object
org.intellij.grammar.generator.ParserGenerator

public class ParserGenerator extends Object
  • Field Details

    • LOG

      public static final com.intellij.openapi.diagnostic.Logger LOG
  • Constructor Details

    • ParserGenerator

      public ParserGenerator(@NotNull @NotNull BnfFile psiFile, @NotNull @NotNull String sourcePath, @NotNull @NotNull String outputPath, @NotNull @NotNull String packagePrefix)
  • Method Details

    • addWarning

      public void addWarning(String text)
    • openOutputInner

      protected PrintWriter openOutputInner(String className, File file) throws IOException
      Throws:
      IOException
    • out

      public void out(String s, Object... args)
    • out

      public void out(String s)
    • newLine

      public void newLine()
    • shorten

      @NotNull public @NotNull String shorten(@NotNull @NotNull String s)
    • generate

      public void generate() throws IOException
      Throws:
      IOException
    • generateParser

      public void generateParser() throws IOException
      Throws:
      IOException
    • generateParser

      public void generateParser(String parserClass, Collection<String> ownRuleNames)
    • generateFirstCheck

      public String generateFirstCheck(BnfRule rule, String frameName, boolean skipIfOne)
    • generateConsumeTextToken

      @NotNull public static @NotNull org.intellij.grammar.generator.NodeCalls.NodeCall generateConsumeTextToken(@NotNull @NotNull org.intellij.grammar.generator.ParserGeneratorUtil.ConsumeType consumeType, @NotNull @NotNull String tokenText)
    • getRuleMethodTypesToImport

      public Collection<String> getRuleMethodTypesToImport(BnfRule rule)