Class BNFGenerator

java.lang.Object
org.javacc.jjdoc.BNFGenerator
All Implemented Interfaces:
Generator

public class BNFGenerator extends Object implements Generator
  • Field Details

  • Constructor Details

    • BNFGenerator

      public BNFGenerator()
  • Method Details

    • get_id

      protected String get_id(String nt)
    • create_output_stream

      protected PrintWriter create_output_stream()
    • text

      public void text(String s)
      Description copied from interface: Generator
      Output string with entity substitution for brackets and ampersands.
      Specified by:
      text in interface Generator
      Parameters:
      s - the String to output
    • print

      public void print(String s)
      Description copied from interface: Generator
      Output String.
      Specified by:
      print in interface Generator
      Parameters:
      s - String to output
    • documentStart

      public void documentStart()
      Description copied from interface: Generator
      Output document header.
      Specified by:
      documentStart in interface Generator
    • documentEnd

      public void documentEnd()
      Description copied from interface: Generator
      Output document footer.
      Specified by:
      documentEnd in interface Generator
    • specialTokens

      public void specialTokens(String s)
      Description copied from interface: Generator
      Output Special Tokens.
      Specified by:
      specialTokens in interface Generator
      Parameters:
      s - tokens to output
    • nonterminalsStart

      public void nonterminalsStart()
      Description copied from interface: Generator
      Output start of non-terminal.
      Specified by:
      nonterminalsStart in interface Generator
    • nonterminalsEnd

      public void nonterminalsEnd()
      Description copied from interface: Generator
      Output end of non-terminal.
      Specified by:
      nonterminalsEnd in interface Generator
    • tokensStart

      public void tokensStart()
      Description copied from interface: Generator
      Output start of tokens.
      Specified by:
      tokensStart in interface Generator
    • tokensEnd

      public void tokensEnd()
      Description copied from interface: Generator
      Output end of tokens.
      Specified by:
      tokensEnd in interface Generator
    • javacode

      public void javacode(JavaCodeProduction jp)
      Description copied from interface: Generator
      Output comment from a production.
      Specified by:
      javacode in interface Generator
      Parameters:
      jp - the JavaCodeProduction to output
    • cppcode

      public void cppcode(CppCodeProduction cp)
      Description copied from interface: Generator
      Output comment from a production.
      Specified by:
      cppcode in interface Generator
      Parameters:
      cp - the CppCodeProduction to output
    • expansionEnd

      public void expansionEnd(Expansion e, boolean first)
      Description copied from interface: Generator
      Output end of Expansion.
      Specified by:
      expansionEnd in interface Generator
      Parameters:
      e - Expansion being output
      first - whether this is the first expansion
    • nonTerminalStart

      public void nonTerminalStart(NonTerminal nt)
      Description copied from interface: Generator
      Output start of non-terminal.
      Specified by:
      nonTerminalStart in interface Generator
      Parameters:
      nt - the NonTerminal being output
    • nonTerminalEnd

      public void nonTerminalEnd(NonTerminal nt)
      Description copied from interface: Generator
      Output end of non-terminal.
      Specified by:
      nonTerminalEnd in interface Generator
      Parameters:
      nt - the NonTerminal being output
    • productionStart

      public void productionStart(NormalProduction np)
      Description copied from interface: Generator
      Output start of a normal production.
      Specified by:
      productionStart in interface Generator
      Parameters:
      np - the NormalProduction being output
    • productionEnd

      public void productionEnd(NormalProduction np)
      Description copied from interface: Generator
      Output end of a normal production.
      Specified by:
      productionEnd in interface Generator
      Parameters:
      np - the NormalProduction being output
    • expansionStart

      public void expansionStart(Expansion e, boolean first)
      Description copied from interface: Generator
      Output start of an Expansion.
      Specified by:
      expansionStart in interface Generator
      Parameters:
      e - Expansion being output
      first - whether this is the first expansion
    • reStart

      public void reStart(RegularExpression r)
      Description copied from interface: Generator
      Output start of regular expression.
      Specified by:
      reStart in interface Generator
      Parameters:
      r - the RegularExpression being output
    • reEnd

      public void reEnd(RegularExpression r)
      Description copied from interface: Generator
      Output end of regular expression.
      Specified by:
      reEnd in interface Generator
      Parameters:
      r - the RegularExpression being output
    • debug

      public void debug(String message)
      Description copied from interface: Generator
      Log debug messages.
      Specified by:
      debug in interface Generator
      Parameters:
      message - the string to log
    • info

      public void info(String message)
      Description copied from interface: Generator
      Log informational messages.
      Specified by:
      info in interface Generator
      Parameters:
      message - the string to log
    • warn

      public void warn(String message)
      Description copied from interface: Generator
      Log warning messages.
      Specified by:
      warn in interface Generator
      Parameters:
      message - the string to log
    • error

      public void error(String message)
      Description copied from interface: Generator
      Log error messages.
      Specified by:
      error in interface Generator
      Parameters:
      message - the string to log
    • handleTokenProduction

      public void handleTokenProduction(TokenProduction tp)
      Specified by:
      handleTokenProduction in interface Generator