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) class
ParserCPVisitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private int
private final ParserCP.ParserCPVisitor
Fields inherited from class org.openjdk.asmtools.jasm.ParseBase
debugFlag, environment, parser, scanner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
checkWrongTag
(ClassFileConst.ConstType tag, ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag) protected ConstCell<?>
parseConstRef
(ClassFileConst.ConstType defaultTag) protected ConstCell<?>
parseConstRef
(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag) protected ConstCell<?>
parseConstRef
(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag, boolean ignoreKeywords) Parse an instruction argument, one of: * #NUMBER, #NAME, [TAG] CONSTVALUEprotected ConstValue<?>
Parse CONSTVALUEprotected ConstValue<?>
parseTagConstValue
(ClassFileConst.ConstType defaultTag) Parse [TAG] CONSTVALUEprotected ConstValue<?>
parseTagConstValue
(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag, boolean ignoreKeywords) private ClassFileConst.ConstType
scanConstByID
(boolean ignoreKeywords) private ClassFileConst.ConstType
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);Methods inherited from class org.openjdk.asmtools.jasm.ParseBase
init, init, init, setDebugFlag, traceMethodInfoLn, traceMethodInfoLn
-
Field Details
-
pConstVstr
-
exitImmediately
private boolean exitImmediately -
lbrace
private int lbrace
-
-
Constructor Details
-
ParserCP
main constructor
-
-
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); -
parseConstValue
Parse CONSTVALUE- Throws:
SyntaxError
-
parseTagConstValue
Parse [TAG] CONSTVALUE- Throws:
SyntaxError
-
scanConstByID
-
scanConstPrimVal
- Throws:
SyntaxError
-
checkWrongTag
private void checkWrongTag(ClassFileConst.ConstType tag, ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag) throws SyntaxError - Throws:
SyntaxError
-
parseTagConstValue
protected ConstValue<?> parseTagConstValue(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag, boolean ignoreKeywords) throws SyntaxError - Throws:
SyntaxError
-
parseConstRef
- Throws:
SyntaxError
-
parseConstRef
protected ConstCell<?> parseConstRef(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag) throws SyntaxError - Throws:
SyntaxError
-
parseConstRef
protected ConstCell<?> parseConstRef(ClassFileConst.ConstType defaultTag, ClassFileConst.ConstType default2Tag, boolean ignoreKeywords) throws SyntaxError Parse an instruction argument, one of: * #NUMBER, #NAME, [TAG] CONSTVALUE- Throws:
SyntaxError
-