How to show all the sytanx errors with highlight error in the script.

SyntaxEditor for WPF Forum

Posted 9 months ago by Ranjit
Version: 18.1.0674
Avatar

Currently i have observed that highlight error is appearing at the first position having the syntax error. but error is not showing when the subsequent lines have the syntax error. Is there any way to parse complete script and throw all the highlight errors at the respective positions

Comments (5)

Posted 9 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Can you please provide more information about what you are seeing?  For instance if it's one of our add-on languages, please tell us the language and give a code snippet we can paste in one of our samples.  Also tell us where you see errors and where you expect to see errors.  Thanks!


Actipro Software Support

Posted 9 months ago by Ranjit
Avatar

Used below script

DIM test as Message;

If test=="" THEN
 test="123";
ENDIF;

Here highlight error is showing under the first line because ==  and = is expecting spaces around it .but the error is not  showing at the second line.

Posted 9 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

Ok it appears you have a custom syntax language.  Are you using our LL(*) Parser Framework to do the parsing and report syntax errors?


Actipro Software Support

Posted 9 months ago by Ranjit
Avatar

Yes we are using Actipro LLParser . Just wanted to know whether is there any way to show all the syntax errors identified in the script instead of first error only.

Answer - Posted 9 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Yes, by default the parser will bubble the error up and quit parsing after the first error.  However if you build in error handling logic, then you can intelligently continue parsing after errors occur.  We do this for all our premium add-on language grammars.

Please see the LL(*) Parser Framework's "Callbacks and Error Handling" topic in the documentation that comes with the product.  That walks through how to do error handling and the next topic after that shows a walkthrough of implementing it.  Our sample grammar in the sample project also shows error handling.


Actipro Software Support

The latest build of this product (v2019.1 build 0683) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.