Problem with keywords

SyntaxEditor for Windows Forms Forum

Posted 14 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 14 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 (v24.1.0) 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.