error in newlisp 10.7.1

Started by pda, September 25, 2020, 04:23:26 AM

Previous topic - Next topic

pda

sometimes newlisp 10.7.1 gets mad and is not able to parse s-expressions



I'm using newlisp-gs in windows 10 utf8 version, and sometimes when writting code in newlisp-gs editor it doen't match parenthesis properly and refuses to parse the expressions with weird error aparently related to encoding (even when typeing directly in editor!)



for example I got error like  ERR: missing parenthesis : "...oin fline ","))rn(close fo)rn(close f�F�"



the strange encoding reads (close fh) in code



same behaviour in console repl, with newlisp 10.7.1  run from windows cmd



anyone with similar problems?

pda

#1
same behaviour in 10.7.4

kosh

#2
Quotefor example I got error like ERR: missing parenthesis : "...oin fline ","))rn(close fo)rn(close f�F�"


Please check that the number of parentheses in the file you are editing is balanced.



It would be safer to edit with an alternative editor (e.g. Notepad++)

pda

#3
parenthesis are balanced and code is checked both in several editors and repl



tests:

- code typed in newlisp GS editor and run from it

- code typed in external editor (geany and SciTE) and pasted into newlisp GS editor to run from it

- code typed in newlisp GS repl

- code type in newlisp repl  (started from cmd.exe console)

- code loaded in newlisp repl from text file edited in external editor, with command :  newslip.exe  file.lsp



allways parenthesis are balanced and allways I get the same error

kosh

#4
1. Could you show me that code?

https://pastebin.com/">https://pastebin.com/, https://gist.github.com/">https://gist.github.com/, etc



2. Also, please make sure again that newlisp.exe supports UTF-8


QuoteC:>newlisp.exe -v


---

I'm not using newLISP GS. However, it doesn't seem to fully support UTF-8.

For example: Run "guiserver/widget-demo-jp.lsp", you can see the garbled text in bellow screenshot



https://i.imgur.com/XPq6Fm7.png">

pda

#5
here you are  https://pastebin.com/25z78mp3">https://pastebin.com/25z78mp3



it's ugly buggy code but not for the issue, you can see parens are balanced

kosh

#6
Well.. From the looks of it, the code seems to be fine.

And the code is parsed correctly in my environment. Of course the execution will fail, but not raise parse error.


C:>curl -o file.lsp https://pastebin.com/raw/25z78mp3
C:>newlisp.exe .file.lsp

ERR: value expected in function read-line : f
called from user function (fline fh)


How about reinstalling newlisp.exe and newLISP-GS?

Sorry I'm not sure I can think of a better solution.