Package jtb.cparser.customvisitor
Class Printer
- Object
-
- DepthFirstVisitor
-
- Printer
-
- All Implemented Interfaces:
Visitor
public class Printer extends DepthFirstVisitor
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>
badExpressions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
commit()
void
print(Object o)
void
println()
void
setFilter(ArrayList<String> filter)
boolean
shouldPrint(String curr, int index)
void
visit(EqualityExpression n)
void
visit(LogicalANDExpression n)
void
visit(LogicalORExpression n)
void
visit(NodeToken n)
void
visit(RelationalExpression n)
-
Methods inherited from class DepthFirstVisitor
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
-
-
-
-
Field Detail
-
badExpressions
public static List<String> badExpressions
-
-
Constructor Detail
-
Printer
public Printer(String fileName) throws IOException
- Throws:
IOException
-
-
Method Detail
-
visit
public void visit(NodeToken n)
- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDepthFirstVisitor
-
close
public void close() throws IOException
- Throws:
IOException
-
println
public void println()
-
shouldPrint
public boolean shouldPrint(String curr, int index)
-
commit
public void commit()
-
visit
public void visit(LogicalANDExpression n)
- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDepthFirstVisitor
-
visit
public void visit(LogicalORExpression n)
- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDepthFirstVisitor
-
visit
public void visit(EqualityExpression n)
- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDepthFirstVisitor
-
visit
public void visit(RelationalExpression n)
- Specified by:
visit
in interfaceVisitor
- Overrides:
visit
in classDepthFirstVisitor
-
-