Package org.openjdk.asmtools.jasm
Class ParserCP
java.lang.Object
org.openjdk.asmtools.jasm.ParseBase
org.openjdk.asmtools.jasm.ParserCP
ParserCP
ParseCP is a parser class owned by Parser.java. It is primarily responsible for parsing
the constant pool and constant declarations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classParserCPVisitor This inner class overrides a constant pool visitor to provide specific parsing instructions (per method) for each type of Constant. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanStop parsing a source file immediately and interpret any issue as an errorprivate intcounter of left bracesprivate ParserCP.ParserCPVisitorVisitor object -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedParserCP(Scanner scanner, Parser parser, Environment env) main constructor -
Method Summary
Modifier and TypeMethodDescriptionprivate voidcheckWrongTag(Tables.ConstType tag, Tables.ConstType defaultTag, Tables.ConstType default2Tag) booleanprotected ConstantPool.ConstCellparseConstRef(Tables.ConstType defaultTag) protected ConstantPool.ConstCellparseConstRef(Tables.ConstType defaultTag, Tables.ConstType default2Tag) protected ConstantPool.ConstCellparseConstRef(Tables.ConstType defaultTag, Tables.ConstType default2Tag, boolean ignoreKeywords) Parse an instruction argument, one of: * #NUMBER, #NAME, [TAG] CONSTVALUEprotected ConstantPool.ConstValueParse CONSTVALUEprotected ConstantPool.ConstValueparseTagConstValue(Tables.ConstType defaultTag) Parse [TAG] CONSTVALUEprotected ConstantPool.ConstValueparseTagConstValue(Tables.ConstType defaultTag, Tables.ConstType default2Tag, boolean ignoreKeywords) private Tables.ConstTypescanConstByID(boolean ignoreKeywords) private Tables.ConstTypevoidsetExitImmediately(boolean exitImmediately) In particular cases it's necessary to interpret a warning issue as an error and stop parsing a source file immediately cpParser.setExitImmediately(true); çparseConstRef(...); cpParser.setExitImmediately(false);Methods inherited from class org.openjdk.asmtools.jasm.ParseBase
debugScan, debugStr, enableDebug, init
-
Field Details
-
exitImmediately
private boolean exitImmediatelyStop parsing a source file immediately and interpret any issue as an error -
pConstVstr
Visitor object -
lbrace
private int lbracecounter of left braces
-
-
Constructor Details
-
ParserCP
main constructor- Parameters:
scanner-parser-env-
-
-
Method Details
-
setExitImmediately
public void setExitImmediately(boolean exitImmediately) In particular cases it's necessary to interpret a warning issue as an error and stop parsing a source file immediately cpParser.setExitImmediately(true); çparseConstRef(...); cpParser.setExitImmediately(false); -
isExitImmediately
public boolean isExitImmediately() -
parseConstValue
protected ConstantPool.ConstValue parseConstValue(Tables.ConstType tag) throws IOException, Scanner.SyntaxError Parse CONSTVALUE- Throws:
IOExceptionScanner.SyntaxError
-
parseTagConstValue
protected ConstantPool.ConstValue parseTagConstValue(Tables.ConstType defaultTag) throws Scanner.SyntaxError, IOException Parse [TAG] CONSTVALUE- Throws:
Scanner.SyntaxErrorIOException
-
scanConstByID
-
scanConstPrimVal
- Throws:
Scanner.SyntaxErrorIOException
-
checkWrongTag
private void checkWrongTag(Tables.ConstType tag, Tables.ConstType defaultTag, Tables.ConstType default2Tag) throws Scanner.SyntaxError, IOException - Throws:
Scanner.SyntaxErrorIOException
-
parseTagConstValue
protected ConstantPool.ConstValue parseTagConstValue(Tables.ConstType defaultTag, Tables.ConstType default2Tag, boolean ignoreKeywords) throws Scanner.SyntaxError, IOException - Throws:
Scanner.SyntaxErrorIOException
-
parseConstRef
protected ConstantPool.ConstCell parseConstRef(Tables.ConstType defaultTag) throws Scanner.SyntaxError, IOException - Throws:
Scanner.SyntaxErrorIOException
-
parseConstRef
protected ConstantPool.ConstCell parseConstRef(Tables.ConstType defaultTag, Tables.ConstType default2Tag) throws Scanner.SyntaxError, IOException - Throws:
Scanner.SyntaxErrorIOException
-
parseConstRef
protected ConstantPool.ConstCell parseConstRef(Tables.ConstType defaultTag, Tables.ConstType default2Tag, boolean ignoreKeywords) throws Scanner.SyntaxError, IOException Parse an instruction argument, one of: * #NUMBER, #NAME, [TAG] CONSTVALUE- Throws:
Scanner.SyntaxErrorIOException
-