Closed ashkotin closed 10 years ago
I would need to see Algor.fol and the parser shell program to tell for sure. Reading the source file should be fine, but perhaps it is an issue with the String created before returning. I expect a UTF-8 encoded string, but I think String returns the encoding for the particular platform, which may not be UTF-8.
At the end of loadSourceFile, type changing the string creation as such...
return new String(buf, "utf-8");
I am in the process of making the project more UTF-8 friendly.
This change does work and I have got tree for Algor.fol. But in this tree my UTF-8 symbols haven't seen. Have a look at attechments.
Alex
2012/9/18 Ralph Iden notifications@github.com
I would need to see Algor.fol and the parser shell program to tell for sure. Reading the source file should be fine, but perhaps it is an issue with the String created before returning. I expect a UTF-8 encoded string, but I think String returns the encoding for the particular platform, which may not be UTF-8.
At the end of loadSourceFile, type changing the string creation as such...
return new String(buf, "utf-8");
I am in the process of making the project more UTF-8 friendly.
— Reply to this email directly or view it on GitHubhttps://github.com/ridencww/goldengine/issues/7#issuecomment-8666530.
+-
::= | +- ::= Declaration Id sort . | | +-Declaration | | +-o | | +-sort | | +-. | +- ::= | | +- ::= Declaration Id sort . | | | +-Declaration | | | +-r | | | +-sort | | | +-. | | +- ::= | | | +- ::= Declaration Id predicate . | | | | +-Declaration | | | | +-Neq | | | | +-predicate | | | | +- ::= Id ',' | | | | | +-o | | | | | +-, | | | | | +- ::= Id | | | | | | +-o | | | | +-. | | | +- ::= | | | | +- ::= Definition Id Id '(' ')' predicate . | | | | | +-Definition | | | | | +-Neq | | | | | +-Neq | | | | | +-( | | | | | +- ::= Id ',' | | | | | | +-x1 | | | | | | +-, | | | | | | +- ::= Id | | | | | | | +-x2 | | | | | +-) | | | | | +-predicate | | | | | +- ::= NOT | | | | | | +-¬ | | | | | | +- ::= '(' '=' ')' | | | | | | | +-( | | | | | | | +- ::= Id | | | | | | | | +-x1 | | | | | | | +-= | | | | | | | +- ::= Id | | | | | | | | +-x2 | | | | | | | +-) | | | | | +-. | | | | +- ::= | | | | | +- ::= Axiom Id . | | | | | | +-Axiom | | | | | | +-Neq | | | | | | +- ::= | | | | | | | +- ::= FOR_ANY | | | | | | | | +-? | | | | | | | | +- ::= Id ':' Id ',' | | | | | | | | | +-x | | | | | | | | | +-: | | | | | | | | | +-o | | | | | | | | | +-, | | | | | | | | | +- ::= Id ':' Id | | | | | | | | | | +-y | | | | | | | | | | +-: | | | | | | | | | | +-o | | | | | | | +- ::= '(' EQUIV ')' | | | | | | | | +-( | | | | | | | | +- ::= '(' Neq ')' | | | | | | | | | +-( | | | | | | | | | +- ::= Id | | | | | | | | | | +-x | | | | | | | | | +-? | | | | | | | | | +- ::= Id | | | | | | | | | | +-y | | | | | | | | | +-) | | | | | | | | +-? | | | | | | | | +- ::= Id '(' ')' | | | | | | | | | +-Neq | | | | | | | | | +-( | | | | | | | | | +- ::= ',' | | | | | | | | | | +- ::= Id | | | | | | | | | | | +-x | | | | | | | | | | +-, | | | | | | | | | | +- ::= Id | | | | | | | | | | | +-y | | | | | | | | | +-) | | | | | | | | +-) | | | | | | +-. | | | | | +- ::= | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | +-Declaration | | | | | | | +-Plus | | | | | | | +-: | | | | | | | +-r | | | | | | | +-function | | | | | | | +- ::= Id ',' | | | | | | | | +-r | | | | | | | | +-, | | | | | | | | +- ::= Id | | | | | | | | | +-r | | | | | | | +-. | | | | | | +- ::= | | | | | | | +- ::= Axiom Id . | | | | | | | | +-Axiom | | | | | | | | +-Plus | | | | | | | | +- ::= | | | | | | | | | +- ::= FOR_ANY | | | | | | | | | | +-? | | | | | | | | | | +- ::= Id ':' Id ',' | | | | | | | | | | | +-x | | | | | | | | | | | +-: | | | | | | | | | | | +-r | | | | | | | | | | | +-, | | | | | | | | | | | +- ::= Id ':' Id | | | | | | | | | | | | +-y | | | | | | | | | | | | +-: | | | | | | | | | | | | +-r | | | | | | | | | +- ::= '(' '=' ')' | | | | | | | | | | +-( | | | | | | | | | | +- ::= '(' Plus ')' | | | | | | | | | | | +-( | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | +-x | | | | | | | | | | | +-+ | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | +-y | | | | | | | | | | | +-) | | | | | | | | | | +-= | | | | | | | | | | +- ::= Id '(' ')' | | | | | | | | | | | +-Plus | | | | | | | | | | | +-( | | | | | | | | | | | +- ::= ',' | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | +-x | | | | | | | | | | | | +-, | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | +-y | | | | | | | | | | | +-) | | | | | | | | | | +-) | | | | | | | | +-. | | | | | | | +- ::= | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | +-Declaration | | | | | | | | | +-Minus | | | | | | | | | +-: | | | | | | | | | +-r | | | | | | | | | +-function | | | | | | | | | +- ::= Id ',' | | | | | | | | | | +-r | | | | | | | | | | +-, | | | | | | | | | | +- ::= Id | | | | | | | | | | | +-r | | | | | | | | | +-. | | | | | | | | +- ::= | | | | | | | | | +- ::= Axiom Id . | | | | | | | | | | +-Axiom | | | | | | | | | | +-Minus | | | | | | | | | | +- ::= | | | | | | | | | | | +- ::= FOR_ANY | | | | | | | | | | | | +-? | | | | | | | | | | | | +- ::= Id ':' Id ',' | | | | | | | | | | | | | +-x | | | | | | | | | | | | | +-: | | | | | | | | | | | | | +-r | | | | | | | | | | | | | +-, | | | | | | | | | | | | | +- ::= Id ':' Id | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | +-r | | | | | | | | | | | +- ::= '(' '=' ')' | | | | | | | | | | | | +-( | | | | | | | | | | | | +- ::= '(' Minus ')' | | | | | | | | | | | | | +-( | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | +-- | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | +-) | | | | | | | | | | | | +-= | | | | | | | | | | | | +- ::= Id '(' ')' | | | | | | | | | | | | | +-Minus | | | | | | | | | | | | | +-( | | | | | | | | | | | | | +- ::= ',' | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | +-, | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | +-) | | | | | | | | | | | | +-) | | | | | | | | | | +-. | | | | | | | | | +- ::= | | | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | | | +-Declaration | | | | | | | | | | | +-Multiply | | | | | | | | | | | +-: | | | | | | | | | | | +-r | | | | | | | | | | | +-function | | | | | | | | | | | +- ::= Id ',' | | | | | | | | | | | | +-r | | | | | | | | | | | | +-, | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | +-r | | | | | | | | | | | +-. | | | | | | | | | | +- ::= | | | | | | | | | | | +- ::= Axiom Id . | | | | | | | | | | | | +-Axiom | | | | | | | | | | | | +-Multiply | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | +- ::= FOR_ANY | | | | | | | | | | | | | | +-? | | | | | | | | | | | | | | +- ::= Id ':' Id ',' | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | | | +-, | | | | | | | | | | | | | | | +- ::= Id ':' Id | | | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | +- ::= '(' '=' ')' | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | +- ::= '(' Multiply ')' | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | | +-* | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | +-= | | | | | | | | | | | | | | +- ::= Id '(' ')' | | | | | | | | | | | | | | | +-Multiply | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | +- ::= ',' | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | | | +-, | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | +-y | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | +-) | | | | | | | | | | | | +-. | | | | | | | | | | | +- ::= | | | | | | | | | | | | +- ::= Declaration Id ':' '(' ':' Id ')' functor . | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | +-VPC | | | | | | | | | | | | | +-: | | | | | | | | | | | | | +-( | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | +-: | | | | | | | | | | | | | +-r | | | | | | | | | | | | | +-) | | | | | | | | | | | | | +-functor | | | | | | | | | | | | | +- ::= '(' ')' | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | +-. | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | +- ::= Declaration Id predicate . | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | +-Opx | | | | | | | | | | | | | | +-predicate | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | +- ::= Declaration Id predicate . | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | +-Cpx | | | | | | | | | | | | | | | +-predicate | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | +- ::= Axiom Id . | | | | | | | | | | | | | | | | +-Axiom | | | | | | | | | | | | | | | | +-Opx_Cpx | | | | | | | | | | | | | | | | +- ::= Id '(' ')' | | | | | | | | | | | | | | | | | +-DisjointClasses | | | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | | | +- ::= ',' | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | +-Opx | | | | | | | | | | | | | | | | | | +-, | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | +-Cpx | | | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | +- ::= Declaration Id predicate . | | | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | | | +-Px | | | | | | | | | | | | | | | | | +-predicate | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | +- ::= Definition Id Id '(' ')' predicate . | | | | | | | | | | | | | | | | | | +-Definition | | | | | | | | | | | | | | | | | | +-Px | | | | | | | | | | | | | | | | | | +-Px | | | | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | | | | | +-predicate | | | | | | | | | | | | | | | | | | +- ::= Id '(' ')' '(' ')' | | | | | | | | | | | | | | | | | | | +-ObjectUnionOf | | | | | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | | | | | +- ::= ',' | | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | | +-Opx | | | | | | | | | | | | | | | | | | | | +-, | | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | | +-Cpx | | | | | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | | | | | | +-( | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | +-x | | | | | | | | | | | | | | | | | | | +-) | | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | | | | | +-VPC_Q | | | | | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | | | | | | | +-function | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | | | | | | +-VPC_A | | | | | | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | | | | | | | | +-function | | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | | | | | | | +-VPC_P | | | | | | | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | | | | | | | | | +-function | | | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | | | | | +- ::= Declaration Id ':' Id function . | | | | | | | | | | | | | | | | | | | | | | +-Declaration | | | | | | | | | | | | | | | | | | | | | | +-VPC_F | | | | | | | | | | | | | | | | | | | | | | +-: | | | | | | | | | | | | | | | | | | | | | | +-r | | | | | | | | | | | | | | | | | | | | | | +-function | | | | | | | | | | | | | | | | | | | | | | +- ::= Id | | | | | | | | | | | | | | | | | | | | | | | +-o | | | | | | | | | | | | | | | | | | | | | | +-. | | | | | | | | | | | | | | | | | | | | | +- ::= | | | | | | | | | | | | | | | | | | | | | | +-
I have UTF-8 symbols like this NOT = [¬] in my grammar.
If I start generated java code like this
java -classpath .;./goldengine-5.0.3-SNAPSHOT prenex_FOLsn ..\Algor.fol -tree
I have got
Lexical error at line 5, column 37. Read (Error) Parse tree is not available. Did you set generateTree(true)?
exectly where ¬ is in Algor.fol
What should I do?
Alex