robert burrell donkin wrote:
>
> ParseException gives information about the line number.
> SyntaxException (on the other hand) contains very little information
> where the problem is. this makes debugging scripts of any size
> difficult.
>
> AFAIC this information is not easily available from where this
> exception is thrown.
>
> how difficult would it be to add the start line number into
> AbstractCommand and then set it during the parse?
>
> are there easier ways to solve this?
>
> - robert

I don't have the code on front of me, but as I remember, it is Executables
that get (in)validated. Enhancing their toString() methods to supply more
contextual information would be useful.

Additional information could be passed into the Executable at parse time by
the creating vistor, such as the AST node that caused its creation. The AST
contains more contextual information but I don't know if this includes line
numbers. A debugging session monitoring the visits to see what can be
gleamed from the AST nodes might be the best way to proceed.

Sorry to be so abstract.

Cheers

-- Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to