Problem with keywords

SyntaxEditor for Windows Forms Forum

Posted 9 years ago by Joe
Avatar
Hi!
I'd like to add a keyword in the SimpleTokenID class called true.
Is it possible to add words which are also keywords in Visual Studio?

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Joe,

Make sure you are working with the ActiproSoftware.Simple.Grammar.xml grammar file. Don't edit the source code for SimpleSemanticParser directly. You should be editing the grammar file and then using our Grammar Designer to code generate the SimpleSemanticParser class.

The grammar file has a section where you can define tokens at the top. So there you'd add instances for True and False. Then you could make a Bool non-terminal that had a production that looked for:
'True' | 'False'

After adding those then code generate the semantic parser using the Grammar Designer.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 6 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.