follow up on this:
if I change the rule for
newline
^ (#cr asParser , #newline asParser optional) / #newline asParser
Then all three tests pass.
If anybody as a clue on what's happening ... ?
(with the first version of the rule, the error was: "end of input
expected at 1")
nicolas
On 26/09/12 09:35, Nicolas Anquetil wrote:
Trying to parse the 3 possible ends of line: Linux=lf
; MacOS=cr;
Windows=crlf
given the rule:
newline
^ #newline asParser / (#cr asParser , #newline asParser optional)
The linux and MacOs tests pass
testNewline1
^self parse: String lf rule: #newline.
testNewline2
^self parse: String cr rule: #newline.
But the windows one fails !?!?!?!
testNewline3
^self parse: String crlf rule: #newline.
Any clue why?
nicolas
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev