Posted 19 years ago by Avalon - TX
Avatar
I am wondering what the best/easiest way to limit certain keywords.
For example I would like to limit all top keywords to being either
CREATE
Single Line Comment
or Multi Line Comment.

Is this a situation where I have to do all of the parsing myself or is there some built in mechanism to help alleviate this problem?

Comments (3)

Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not sure I understand the scenario exactly but you can assign custom highlighting styles to each Token. You can use that feature to override the style that the lexical parser assigns.


Actipro Software Support

Posted 19 years ago by Avalon - TX
Avatar
I have a partial editor. It will be used for editing a stored procedure.
A Stored Proceudre will always start off with the words CREATE or ALTER
. Hence why I would technically like to be able to easily make it such that if anybody types anything except for CREATE or ALTEr or a comment squiggly lines would show up.

I am hoping that there is some built-in functionality that already does this.
Posted 19 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
If you implement a semantic parser, you can override the PostParse method of that and scan the Tokens that were parsed. If at the beginning of the document you don't see the keyword you want, add a span indicator that has a squiggle line. The spelling error indicator has that feature.


Actipro Software Support

The latest build of this product (v24.1.0) was released 25 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.