|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.xmloperator.lambda.tree.serialize.UsualSerializer
Usual Expression serializer, convenient for a human reader.
--- Term syntax
Term ::= Variable | EndOfScope | Abstraction | Application | '(' Term ')' Variable ::= ( 'a' | ... | 'z' ) Number? Number ::= ('0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9')+ Abstraction ::= '\' VariableList '.' Term EndOfScope ::= '/' VariableList '.' Term VariableList ::= Variable+ Application ::= Term Term
Constructor Summary | |
UsualSerializer(boolean isEndOfScopeWritenOut)
|
Method Summary | |
static void |
main(java.lang.String[] args)
|
Term |
readTerm(java.io.Reader reader,
TermFactory termFactory)
Produces a Term from a previous serialization. |
static boolean |
test(java.io.PrintStream out,
boolean isVerbose)
Serializes in and out some terms. |
void |
underlineRedex(java.io.PrintWriter out,
Term rootTerm,
Application underlinedRedex)
Writes a string value that underline a redex. |
void |
underlineTerm(java.io.PrintWriter out,
Term rootTerm,
Term underlinedTerm)
Writes a string value that underline a sub-Term. |
void |
writeTerm(java.io.PrintWriter out,
Term rootTerm)
Writes a Term. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UsualSerializer(boolean isEndOfScopeWritenOut)
Method Detail |
public static void main(java.lang.String[] args)
public static boolean test(java.io.PrintStream out, boolean isVerbose)
out
- the PrintStream to print results. May be null.isVerbose
- if true then all tests have to be displayed.
public void writeTerm(java.io.PrintWriter out, Term rootTerm)
Serializer
writeTerm
in interface Serializer
out
- a PrintWriter.rootTerm
- a Term to write out.public void underlineTerm(java.io.PrintWriter out, Term rootTerm, Term underlinedTerm)
Serializer
underlineTerm
in interface Serializer
out
- a PrintWriter.rootTerm
- a Term.underlinedTerm
- a sub-Term to underline.public void underlineRedex(java.io.PrintWriter out, Term rootTerm, Application underlinedRedex)
Serializer
underlineRedex
in interface Serializer
out
- a PrintWriter.rootTerm
- a Term.underlinedRedex
- a redex to underline.public Term readTerm(java.io.Reader reader, TermFactory termFactory) throws java.io.IOException
Serializer
readTerm
in interface Serializer
reader
- a Reader.termFactory
- the factory for building the Term.
java.io.IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |