Class SQLParser

java.lang.Object
ortus.boxlang.compiler.parser.AbstractParser
ortus.boxlang.compiler.parser.SQLParser

public class SQLParser extends AbstractParser
Parser for QoQ scripts
  • Constructor Details

    • SQLParser

      public SQLParser()
      Constructor
    • SQLParser

      public SQLParser(int startLine, int startColumn)
  • Method Details

    • parse

      public ParsingResult parse(File file, boolean isScript)
      Parse a QoQ script file
      Specified by:
      parse in class AbstractParser
      Parameters:
      file - source file to parse
      Returns:
      a ParsingResult containing the AST with a BoxScript as root and the list of errors (if any)
      See Also:
    • parse

      public ParsingResult parse(String code, boolean isScript)
      Parse a QoQ string
      Parameters:
      code - source code to parse
      Returns:
      a ParsingResult containing the AST with a BoxScript as root and the list of errors (if any)
      See Also:
    • parse

      public ParsingResult parse(String code)
    • parse

      public ParsingResult parse(String code, boolean classOrInterface, boolean isScript)
      Parse a QoQ script string
      Specified by:
      parse in class AbstractParser
      Parameters:
      code - source code to parse
      Returns:
      a ParsingResult containing the AST with a BoxScript as root and the list of errors (if any)
      See Also:
    • parserFirstStage

      protected BoxNode parserFirstStage(InputStream stream, boolean classOrInterface, boolean isScript)
      Fist stage parser
      Specified by:
      parserFirstStage in class AbstractParser
      Parameters:
      stream - input stream (file or string) of the source code
      classOrInterface - true if the code is a class or interface as opposed to just a list of statements
      Returns:
      the ANTLR ParserRule representing the parse tree of the code
    • setSubParser

      public SQLParser setSubParser(boolean subParser)
      Overrides:
      setSubParser in class AbstractParser
    • reportError

      public void reportError(String message, Position position)