HP Forums

Full Version: UserRPL. Detect lines with syntax error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Reading old discussions I stumbled on one that reports that the Jazz compiler/builder for sysRPL can tell the user if there is a syntax error and on which line.

Instead when I use userRPL and I pass a program to the calculator in text mode, getting back a "syntax error", the information given back are much more cryptic and often not helpful. (especially for files that in origin are 21 Kbytes and at the end -after trimming the comments - are 3 Kbytes)

So I normally end up toggling large part of a program as "comments" until I identify the part with the unwanted error.

Is there a way to get more information about the syntax error message? That would speed up a part of debugging.
Splitting the 21k to smaller building blogs? I know, I know this is not the answer you are after. Smile
I do already, sort of. I take blocks aways and I copy to the calculator, until the block I inserted produces the error, and then I take smaller blocks from the block away, and so on. I hoped to something more specific. Like "look I did not expect this char C at line Y"
When I don't know where a program (of any language) breaks, I usually have messages printed along the execution of it to learn where it still worked.
(04-03-2017 06:18 PM)Thomas Radtke Wrote: [ -> ]When I don't know where a program (of any language) breaks, I usually have messages printed along the execution of it to learn where it still worked.

That's fine, but that comes before the parsing of the program. You likely mean output at runtime, I mean before it runs.
Ah, sorry! Got it now. Has been quite some time since I used my 48G and wasn't aware of this particular problem.
It usually have to do something about object types (wrong type of data) or the special characters on command names. Atleast the emu48 do parse the programs with STR-> command or similar when it receives userRPL program, [IIRC] the same happens when you use inbuild editor in calculator and place the object to the stack [/IIRC].

There is people here who knows the system better than me.
Yes often it is due the trigraphs (asci codes for special symbols).

Like instead of "\->" I write "\.>" (the characters are near on the german/italian layout) , the point is, in a 10 kb file in notepad++, it is not so immediate to spot the error.
Reference URL's