Package ghidra.app.util.cparser.CPP
Class PreProcessor
java.lang.Object
ghidra.app.util.cparser.CPP.PreProcessor
- All Implemented Interfaces:
PreProcessorConstants
-
Field Summary
Modifier and TypeFieldDescriptionNext token.Current token.Generated Token Manager.Fields inherited from interface ghidra.app.util.cparser.CPP.PreProcessorConstants
__LT, _AND, _BLANKLINE, _BOM, _CMT, _CMT0, _CMT11, _CMT3, _CMT4, _CMT5, _COD, _COD_PRAG, _COD_WSP, _COD1, _COD2, _COD3, _COD4, _CODC, _COLON, _CTRL, _ECMT10, _ECMT3, _ECMT5, _ECMT7, _ECMT8, _ECMT9, _EECMT7, _EECMT9, _EEECMT9, _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, CMNTNL, CMT, COD, COLON, COMMA, COMMENT, CONLINE, CONSTANT, CONSTITUENT, CONTARG, CP, DECIMAL_LITERAL, DEFAULT, DEFD, DEFINE, DEFINED, DIR, DIRECTIVE, DIRECTIVECOMMENT, 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, INFO, INFO_EXPRN, INFOLINE, INTEGER_LITERAL, ITEM, LE, LEADIN3, LINE, LINECOMMENT, LINEINFO, LINLINE, LOG_AND, LOG_OR, LSH, LT, MACEXPPATH, MACROARGS, MACROARGSEND, MACROMV, MACROMVTAG, MACRORV, MACRORVCMT, MACROVALS, MACROVALS_COMMENT, 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, 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
ConstructorDescriptionConstructor 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 TypeMethodDescriptionvoid
addIncludePath
(String path) void
addIncludePaths
(String[] paths) final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Define()
boolean
final void
Disable tracing.final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
ElIf()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Else()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
ElseMark()
final void
Enable tracing.final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
EndIf()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
EqualTo()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Error()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Generate ParseException.ghidra.app.util.cparser.CPP.PreProcessor.PPToken
getDef
(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) getDoubleValue
(String val) final Token
Get the next Token.int
getNumericType
(String val) final Token
getToken
(int index) Get the specific Token.final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Group()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
If()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
IfDef()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
IFGroup()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
IfNDef()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Include()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Info()
final void
Input()
boolean
isArg
(ghidra.app.util.cparser.CPP.PreProcessor.PPToken arg) boolean
isDef
(ghidra.app.util.cparser.CPP.PreProcessor.PPToken def) final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
LessThan()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
LineInfo()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
LogAnd()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
LogOr()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
static void
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
NewLines()
final void
NoMas()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
boolean
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Pragma()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Qmark()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
void
Reinitialise.void
ReInit
(InputStream stream) Reinitialise.void
ReInit
(InputStream stream, String encoding) Reinitialise.void
Reinitialise.final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
void
void
setMonitor
(TaskMonitor monitor) void
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Text()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
UnDef()
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Values()
int
final ghidra.app.util.cparser.CPP.PreProcessor.PPToken
Warning()
-
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.
-