UserRPL. Detect lines with syntax error
|
04-03-2017, 08:38 AM
Post: #1
|
|||
|
|||
UserRPL. Detect lines with syntax error
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. Wikis are great, Contribute :) |
|||
04-03-2017, 12:57 PM
Post: #2
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
Splitting the 21k to smaller building blogs? I know, I know this is not the answer you are after.
|
|||
04-03-2017, 05:08 PM
Post: #3
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
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"
Wikis are great, Contribute :) |
|||
04-03-2017, 06:18 PM
Post: #4
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
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, 08:06 PM
Post: #5
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
(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. Wikis are great, Contribute :) |
|||
04-04-2017, 04:08 PM
Post: #6
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
Ah, sorry! Got it now. Has been quite some time since I used my 48G and wasn't aware of this particular problem.
|
|||
04-05-2017, 04:09 PM
Post: #7
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
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. |
|||
04-05-2017, 05:56 PM
Post: #8
|
|||
|
|||
RE: UserRPL. Detect lines with syntax error
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. Wikis are great, Contribute :) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 3 Guest(s)