Posted 17 years ago by Michel van den Berg
Version: 4.0.0274
Avatar
I am trying to create extra syntax for comments (beginning with <## and ending with ##>) in the VBSyntaxLanguage (addon). However, I am unsure how to begin. I've already inherited from VBSyntaxLanguage and tried to create a new lexical state for these types of comments and with that a lexical scope with a lexical state transition. When I type "<##" I get an exception. I think this is because I've yet to add a token for the start/end comment. However, as I stated, I am unsure if this is the right way to achieve the wanted feature.

Could you please point me into the right direction?

Michel

Comments (3)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I'm not sure, as the .NET Languages Add-on really wasn't designed with extensibility for additional constructs in mind. I'd have to see a project that repros this exception to debug it.

You may also need the source code for the add-on to do this since the lexical parser is in procedural code and would need to be modified to add support for your new tokens most likely.


Actipro Software Support

Posted 17 years ago by Michel van den Berg
Avatar
Isn't it possible to "open" up the addon a bit. For example, why would you have the parser(s) to be internal? It they would be public, we could extend them.
Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Unfortunately not really. All the lexical parsing, semantic parsing, context building, and IntelliPrompt code is designed to operate with the C# 3.0 and VB 9.0 standards, looking for specific tokens and sequences of tokens, etc. Since that is all C# procedural code in terms of implementation, there is no good way to make the language itself be extensible.

This is why we offer the source code for an additional reasonable price. You can always purchase that and change our code as needed to support your custom constructs. This way you can fully support your own custom additions to the language.


Actipro Software Support

The latest build of this product (v24.1.1) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.