Package ghidra.app.util.cparser.CPP
Class PreProcessor
java.lang.Object
ghidra.app.util.cparser.CPP.PreProcessor
- All Implemented Interfaces:
PreProcessorConstants
-
Field Summary
FieldsModifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface ghidra.app.util.cparser.CPP.PreProcessorConstants
__LT, _AND, _BLANKLINE, _BOM, _CMT, _CMT_MACROARGS, _CMT0, _CMT11, _CMT3, _CMT4, _COD, _COD_PRAG, _COD_WSP, _COD1, _COD2, _COD3, _COD4, _CODC, _COLON, _CTRL, _ECMT_COMMENT_e, _ECMT_COMMENT_eo, _ECMT_COMMENT_es, _ECMT_COMMENT_ns, _ECMT_COMMENT_s, _ECMT_DIRECTIVECOMMENT_e, _ECMT_DIRECTIVECOMMENT_eo, _ECMT_DIRECTIVECOMMENT_es, _ECMT_DIRECTIVECOMMENT_ns, _ECMT_DIRECTIVECOMMENT_s, _ECMT_INC, _ECMT_INCLUDE_e, _ECMT_INCLUDE_eo, _ECMT_INCLUDE_es, _ECMT_INCLUDE_ns, _ECMT_INCLUDE_s, _ECMT_MACROARGS, _ECMT_MACROARGSe, _ECMT_MACROARGSeo, _ECMT_MACROARGSes, _ECMT_MACROARGSns, _ECMT_MACROARGSs, _ECMT_MACROVALS_e, _ECMT_MACROVALS_eo, _ECMT_MACROVALS_es, _ECMT_MACROVALS_ew, _ECMT_MACROVALS_ns, _ECMT_MACROVALS_s, _ECMT_RVALUES_e, _ECMT_RVALUES_eo, _ECMT_RVALUES_es, _ECMT_RVALUES_ns, _ECMT_RVALUES_s, _ECMT8, _ENDREL, _EQ, _EQT, _EQT1, _GE, _GT, _HEX, _INCCOD, _INCCP, _INCOP, _INCSTANDARD, _INCWSP, _LCMT, _LCMT0, _LCMT11, _LCMT20, _LCMT21, _LCMT4, _LCMT7, _LCMTPRAG, _LE, _LEADIN1, _LEADIN2, _LOG_AND, _LOG_OR, _LSH, _LT, _MACWSP, _MINUS, _MWSP, _NEQ, _OR, _PERCENT, _PLUS, _QMARK, _QTE, _QTE0, _QTE1, _RSH, _SCMT_PRAG, _TOEOL, _WSP, _WSP_INFO, _WSP0, _WSP2, _WSP3, _WSP4, _WSP5, _WSP6, _WSP7, _WSP8, _XOR, _XSYM, _XSYMENDL, AND, BEGITEM, CHAR_LITERAL, CHAR_NUMERIC, CMNTNL, CMT, COD, COLON, COMMA, COMMENT, COMMENT_END, CONLINE, CONSTANT, CONSTITUENT, CONTARG, CP, DECIMAL_LITERAL, DEFAULT, DEFD, DEFINE, DEFINED, DIR, DIRECTIVE, DIRECTIVECOMMENT, DIRECTIVECOMMENT_END, DIRLINE, DIVIDE, ECMT, ELIF, ELSE, ENDCMT, ENDIF, ENDITEM, ENDL, ENDREL, EOF, EOLCMNTNL, EQ, ERRLINE, ERROR, ERROR_EXPRN, ESTD, EXPATH, EXPONENT, FP_LITERAL, FP_NUMERIC, GE, GT, HASINCLUDE, HASINCLUDENEXT, HEX_DIGIT, HEX_LITERAL, IF, IFDEF, IFDEF_EXPRN, IFDEFED, IFDLINE, IFNDEF, IFNDEF_EXPRN, IFNDEFED, IFNDLINE, IGNORETOEOL, INCDEF, INCLINE, INCLUDE, INCLUDE_COMMENT, INCLUDE_COMMENT_END, INFO, INFO_EXPRN, INFOLINE, INTEGER_LITERAL, ITEM, LE, LEADIN3, LINE, LINECOMMENT, LINEINFO, LINLINE, LOG_AND, LOG_OR, LSH, LT, MACEXPPATH, MACROARGS, MACROARGSCOMMENT, MACROARGSCOMMENT_END, MACROARGSEND, MACROMV, MACROMVTAG, MACRORV, MACRORVCMT, MACROVALS, MACROVALS_COMMENT, MACROVALS_COMMENT_END, MANIFEST, MCVLINE, MINUS, MOD, MOREARG, MOREVAL, MQUOTED_VAL, MQUOTED_VALUE, NEQ, NEWLINE, NOPAR, NOT, NOTCHR, NOTCMT, NOTCMTCOD, NOTENDL, NOTENDLC, NOTENDLSTAR, NOTVALCMT, NOTWQC, NOTWS, NOTWSQ, NOTWSQLT, NOTWWSQLT, NUMERIC, OCTAL_LITERAL, OP, OPTD, OPTIONED, OR, OTHER_TEXT, OUTER_TEXT, PLUS, PRAGLINE, PRAGMA, PRAGMA_EXPRN, QMARK, QUOTED_TEXT, QUOTED_VAL, QUOTED_VALUE, REL, RELATIVE, RELPATH, RSH, RVALUES, RVALUES_COMMENT, RVALUES_COMMENT_END, RVSLINE, SpecialBlockComment, SpecialEOLComment, STANDARD, STARTCMT, STD, STDPATH, TIMES, tokenImage, UNDEFINE, UNDIR, UNDIRALL, UNDLINE, VALUES, VALUESCMT, WARNING, WARNING_EXPRN, WARNLINE, WS, WSP, XOR, XSYM, XSYMLINK, XSYMLINKPATH, XSYMPATH -
Constructor Summary
ConstructorsConstructorDescriptionConstructor with generated Token Manager.PreProcessor(InputStream stream) Constructor with InputStream.PreProcessor(InputStream stream, String encoding) Constructor with InputStream and supplied encodingPreProcessor(Reader stream) Constructor.PreProcessor(String filename) PreProcessor(String[] args) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIncludePath(String path) voidaddIncludePaths(String[] paths) final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenDefine()booleanfinal voidDisable tracing.final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenElIf()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenElse()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenElseMark()final voidEnable tracing.final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenEndIf()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenEqualTo()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenError()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenGenerate ParseException.ghidra.app.util.cparser.CPP.PreProcessor.PPTokengetDef(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) getDoubleValue(String val) final TokenGet the next Token.intgetNumericType(String val) final TokengetToken(int index) Get the specific Token.final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenGroup()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenIf()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenIfDef()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenIFGroup()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenIfNDef()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenInclude()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenInfo()final voidInput()booleanisArg(ghidra.app.util.cparser.CPP.PreProcessor.PPToken arg) booleanisDef(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenLessThan()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenLineInfo()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenLogAnd()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenLogOr()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenstatic voidfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenNewLines()final voidNoMas()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenbooleanfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenPragma()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenQmark()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenvoidReinitialise.voidReInit(InputStream stream) Reinitialise.voidReInit(InputStream stream, String encoding) Reinitialise.voidReinitialise.final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenvoidvoidsetMonitor(TaskMonitor monitor) voidfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenText()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenUnDef()final ghidra.app.util.cparser.CPP.PreProcessor.PPTokenfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenValues()intfinal ghidra.app.util.cparser.CPP.PreProcessor.PPTokenWarning()
-
Field Details
-
token_source
Generated Token Manager. -
token
Current token. -
jj_nt
Next token.
-
-
Constructor Details
-
PreProcessor
- Throws:
ParseException
-
PreProcessor
- Throws:
ParseException
-
PreProcessor
- Throws:
ParseException
-
PreProcessor
Constructor with InputStream. -
PreProcessor
Constructor with InputStream and supplied encoding -
PreProcessor
Constructor. -
PreProcessor
Constructor with generated Token Manager.
-
-
Method Details
-
verboseLevel
public int verboseLevel() -
curFileStackTop
-
getDefinitions
-
getDef
public ghidra.app.util.cparser.CPP.PreProcessor.PPToken getDef(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) -
getDef
-
isDef
public boolean isDef(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) -
isArg
public boolean isArg(ghidra.app.util.cparser.CPP.PreProcessor.PPToken arg) -
addIncludePath
-
addIncludePaths
-
getNumericType
-
getDoubleValue
-
getParseMessages
-
didParseSucceed
public boolean didParseSucceed() -
setArgs
- Throws:
ParseException
-
setOutputStream
-
parse
- Throws:
ParseException
-
setMonitor
-
main
-
Input
- Throws:
ParseException
-
TranslationUnit
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken TranslationUnit() throws ParseException- Throws:
ParseException
-
NoMas
- Throws:
ParseException
-
Group
- Throws:
ParseException
-
GroupPart
- Throws:
ParseException
-
ControlLine
- Throws:
ParseException
-
IFSection
- Throws:
ParseException
-
IFGroup
- Throws:
ParseException
-
IfCondition
- Throws:
ParseException
-
ElseIfCondition
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken ElseIfCondition() throws ParseException- Throws:
ParseException
-
Include
- Throws:
ParseException
-
LineInfo
- Throws:
ParseException
-
Define
- Throws:
ParseException
-
UnDef
- Throws:
ParseException
-
MacroArgs
- Throws:
ParseException
-
MacroVals
- Throws:
ParseException
-
Pragma
- Throws:
ParseException
-
IfDef
- Throws:
ParseException
-
IfDefExpr
- Throws:
ParseException
-
IfNDef
- Throws:
ParseException
-
IfNDefExpr
- Throws:
ParseException
-
Error
- Throws:
ParseException
-
Warning
- Throws:
ParseException
-
Info
- Throws:
ParseException
-
EndIf
- Throws:
ParseException
-
Else
- Throws:
ParseException
-
If
- Throws:
ParseException
-
ElIf
- Throws:
ParseException
-
Values
- Throws:
ParseException
-
QuotedValue
- Throws:
ParseException
-
Text
- Throws:
ParseException
-
NewLines
- Throws:
ParseException
-
QuotedText
- Throws:
ParseException
-
CompoundConditionalExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken CompoundConditionalExpression() throws ParseException- Throws:
ParseException
-
CompoundAndExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken CompoundAndExpression() throws ParseException- Throws:
ParseException
-
CompoundOrExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken CompoundOrExpression() throws ParseException- Throws:
ParseException
-
ConditionalExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken ConditionalExpression() throws ParseException- Throws:
ParseException
-
LogicalOrExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken LogicalOrExpression() throws ParseException- Throws:
ParseException
-
LogicalAndExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken LogicalAndExpression() throws ParseException- Throws:
ParseException
-
EqualityExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken EqualityExpression() throws ParseException- Throws:
ParseException
-
InEqualityExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken InEqualityExpression() throws ParseException- Throws:
ParseException
-
RelationalExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken RelationalExpression() throws ParseException- Throws:
ParseException
-
LessExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken LessExpression() throws ParseException- Throws:
ParseException
-
LessThanOrEqualExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken LessThanOrEqualExpression() throws ParseException- Throws:
ParseException
-
GreaterThanOrEqualExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken GreaterThanOrEqualExpression() throws ParseException- Throws:
ParseException
-
GreaterThanExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken GreaterThanExpression() throws ParseException- Throws:
ParseException
-
LogOr
- Throws:
ParseException
-
LogAnd
- Throws:
ParseException
-
EqualTo
- Throws:
ParseException
-
NotEqualTo
- Throws:
ParseException
-
LessThan
- Throws:
ParseException
-
LessThanOrEqual
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken LessThanOrEqual() throws ParseException- Throws:
ParseException
-
GreaterThan
- Throws:
ParseException
-
GreaterThanOrEqual
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken GreaterThanOrEqual() throws ParseException- Throws:
ParseException
-
Qmark
- Throws:
ParseException
-
ElseMark
- Throws:
ParseException
-
Assertion
- Throws:
ParseException
-
Expression
- Throws:
ParseException
-
InclusiveORExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken InclusiveORExpression() throws ParseException- Throws:
ParseException
-
ExclusiveORExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken ExclusiveORExpression() throws ParseException- Throws:
ParseException
-
ANDExpression
- Throws:
ParseException
-
ShiftExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken ShiftExpression() throws ParseException- Throws:
ParseException
-
AdditiveExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken AdditiveExpression() throws ParseException- Throws:
ParseException
-
MultiplicativeExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken MultiplicativeExpression() throws ParseException- Throws:
ParseException
-
UnaryExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken UnaryExpression() throws ParseException- Throws:
ParseException
-
LogNegation
- Throws:
ParseException
-
ValueExpression
public final ghidra.app.util.cparser.CPP.PreProcessor.PPToken ValueExpression() throws ParseException- Throws:
ParseException
-
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
ReInit
Reinitialise. -
getNextToken
Get the next Token. -
getToken
Get the specific Token. -
generateParseException
Generate ParseException. -
enable_tracing
public final void enable_tracing()Enable tracing. -
disable_tracing
public final void disable_tracing()Disable tracing.
-