Package org.openjdk.asmtools.jcoder
Class Jcoder
java.lang.Object
org.openjdk.asmtools.jcoder.Jcoder
Compiles just 1 source file
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
private static enum
private class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ByteBuffer
private DataOutputStream
private ArrayList<ByteBuffer>
private Jcoder.Context
private int
protected SourceFile
private static char
protected Scanner
private String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
adjustDepth
(boolean up) private void
Expect a token, return its value, scan the next token or throw an exception.private void
Parse an array of struct.private void
Parse an Attribute.private void
Parse a byte array.private void
parseClass
(JcodTokens.Token prev) Parse a class or interface declaration.private void
private void
Parse a Component of JavaCard .cap file.(package private) void
Parse an Jcoder file.private void
Parse module declarationprivate int
Parse a structure.private void
private void
Recover after a syntax error in the file.void
Writes the classesvoid
write
(ByteBuffer cls, File destdir) write to the directory passed with -d option
-
Field Details
-
Classes
-
buf
-
bufstream
-
depth
private int depth -
tabStr
-
context
-
env
-
scanner
-
fileSeparator
private static char fileSeparator
-
-
Constructor Details
-
Jcoder
Jcoder(SourceFile sf, HashMap<String, String> macros) throws IOExceptionCreate a parser- Throws:
IOException
-
-
Method Details
-
expect
Expect a token, return its value, scan the next token or throw an exception.- Throws:
SyntaxError
IOException
-
recoverField
- Throws:
SyntaxError
IOException
-
parseArray
Parse an array of struct.- Throws:
IOException
-
parseByteArray
Parse a byte array.- Throws:
IOException
-
parseAttr
Parse an Attribute.- Throws:
IOException
-
parseComp
Parse a Component of JavaCard .cap file.- Throws:
IOException
-
adjustDepth
private void adjustDepth(boolean up) -
parseStruct
Parse a structure.- Throws:
IOException
-
recoverFile
Recover after a syntax error in the file. This involves discarding tokens until an EOF or a possible legal continuation is encountered.- Throws:
IOException
-
parseModule
Parse module declaration- Throws:
IOException
-
parseClass
Parse a class or interface declaration.- Throws:
IOException
-
parseClause
- Throws:
IOException
-
parseFile
void parseFile()Parse an Jcoder file. -
write
write to the directory passed with -d option- Throws:
IOException
-
write
Writes the classes- Throws:
IOException
-