Package ortus.boxlang.compiler.parser
Class SQLParser
java.lang.Object
ortus.boxlang.compiler.parser.AbstractParser
ortus.boxlang.compiler.parser.SQLParser
Parser for QoQ scripts
-
Field Summary
Fields inherited from class ortus.boxlang.compiler.parser.AbstractParser
comments, file, issues, sourceCode, sourceToParse, startColumn, startLine, subParser -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionParse a QoQ script fileParse a QoQ stringParse a QoQ script stringprotected BoxNodeparserFirstStage(InputStream stream, boolean classOrInterface, boolean isScript) Fist stage parservoidreportError(String message, Position position) setSubParser(boolean subParser) Methods inherited from class ortus.boxlang.compiler.parser.AbstractParser
addErrorListeners, createOffsetPosition, createPosition, escapeStringLiteral, extractMultiLineCommentText, getComments, getInputStream, getPosition, getPosition, getPosition, getPosition, getPosition, getPositionStartingAt, getPositionStartingAt, getSourceText, getSourceText, getSourceText, getSourceText, getSourceText, isScope, isSubParser, profileParser
-
Constructor Details
-
SQLParser
public SQLParser()Constructor -
SQLParser
public SQLParser(int startLine, int startColumn)
-
-
Method Details
-
parse
Parse a QoQ script file- Specified by:
parsein classAbstractParser- 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
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
-
parse
Parse a QoQ script string- Specified by:
parsein classAbstractParser- 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
Fist stage parser- Specified by:
parserFirstStagein classAbstractParser- Parameters:
stream- input stream (file or string) of the source codeclassOrInterface- 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
- Overrides:
setSubParserin classAbstractParser
-
reportError
-