"Eduardo Cavazos" wrote: >marcomaggi wrote: > >> FWIW I started repackaging SILex[1] by Danny Dube' into Nausicaa. < > I just got around to trying this out and wanted to > confirm, it works like a charm. I.e. also the calculator > demo you posted below (Tested in Ikarus)
Notice that the line: | blanks [ \n\t]+ is wrong because \t is not recognised by SILex as the tab character; this causes the function "tan" to be split into "t" (ignored) and the token "an". I replaced it with: | blanks [ \9\10\13]+ using the numeric codes everywhere to be safe. SILex should recognise \n as a newline, but \t and \r should be seen as the plain chars t and r. > Thanks for investigating this Marco. 99% of credits for the lexer table goes to Ian Grant, which made it available in Guile-Arith. -- Marco Maggi
