class Jcoder
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Jcoder.Context |
private static class |
Jcoder.ContextTag |
private class |
Jcoder.ContextVal |
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
buf |
private java.io.DataOutputStream |
bufstream |
private java.util.ArrayList<ByteBuffer> |
Classes |
private Jcoder.Context |
context |
private int |
depth |
protected SourceFile |
env |
private static char |
fileSeparator |
protected Scanner |
scanner |
private java.lang.String |
tabStr |
Constructor and Description |
---|
Jcoder(SourceFile sf,
java.util.HashMap<java.lang.String,java.lang.String> macros)
Create a parser
|
Modifier and Type | Method and Description |
---|---|
private void |
adjustDepth(boolean up) |
private void |
expect(JcodTokens.Token t)
Expect a token, return its value, scan the next token or throw an exception.
|
private void |
parseArray()
Parse an array of struct.
|
private void |
parseAttr()
Parse an Attribute.
|
private void |
parseByteArray()
Parse a byte array.
|
private void |
parseClass(JcodTokens.Token prev)
Parse a class or interface declaration.
|
private void |
parseClause() |
private void |
parseComp()
Parse a Component of JavaCard .cap file.
|
(package private) void |
parseFile()
Parse an Jcoder file.
|
private void |
parseModule()
Parse module declaration
|
private int |
parseStruct()
Parse a structure.
|
private void |
recoverField() |
private void |
recoverFile()
Recover after a syntax error in the file.
|
void |
write(ByteBuffer cls,
java.io.File destdir)
write to the directory passed with -d option
|
void |
write(java.io.File destdir)
Writes the classes
|
private java.util.ArrayList<ByteBuffer> Classes
private ByteBuffer buf
private java.io.DataOutputStream bufstream
private int depth
private java.lang.String tabStr
private Jcoder.Context context
protected SourceFile env
protected Scanner scanner
private static char fileSeparator
Jcoder(SourceFile sf, java.util.HashMap<java.lang.String,java.lang.String> macros) throws java.io.IOException
java.io.IOException
private void expect(JcodTokens.Token t) throws SyntaxError, java.io.IOException
SyntaxError
java.io.IOException
private void recoverField() throws SyntaxError, java.io.IOException
SyntaxError
java.io.IOException
private void parseArray() throws java.io.IOException
java.io.IOException
private void parseByteArray() throws java.io.IOException
java.io.IOException
private void parseAttr() throws java.io.IOException
java.io.IOException
private void parseComp() throws java.io.IOException
java.io.IOException
private void adjustDepth(boolean up)
private int parseStruct() throws java.io.IOException
java.io.IOException
private void recoverFile() throws java.io.IOException
java.io.IOException
private void parseModule() throws java.io.IOException
java.io.IOException
private void parseClass(JcodTokens.Token prev) throws java.io.IOException
java.io.IOException
private void parseClause() throws java.io.IOException
java.io.IOException
void parseFile()
public void write(ByteBuffer cls, java.io.File destdir) throws java.io.IOException
java.io.IOException
public void write(java.io.File destdir) throws java.io.IOException
java.io.IOException