Can I get dynamic lexers directly from built in languages?

SyntaxEditor .NET Languages Add-on for WPF Forum

Posted 8 years ago by Craig - Varigence, Inc.
Version: 11.1.0544
Avatar
Looking at the Language Transitions sample's code, from the WPF Studio Sample browser, I see that you use dynamic lexers for the outer XML and the inner C#. To obtain the dynamic lexers, you rely on the .langdef files to first load the languages.

I was just curious if I already have an instance of the CSharpLanguage, from the .NET language add-on, is there a way for me to obtain a Dynamic lexer, or do I need to recreate the language using the .langdef? If the latter, are there any other differences between the built-in language and the one created from the .langdef that I should be aware of?

Thanks,

-Craig

Comments (1)

Posted 8 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Craig,

The .NET Languages Add-on uses a programmatic lexer (hand-coded) as opposed to the C# lexer that comes with SyntaxEditor in the CSharp.langdef, which is a dynamic lexer. The programmatic one in the add-on is much more advanced and tokenizes everything in a completely different way. Both lexers will syntax highlight similarly however the more advanced add-on lexer is needed to help drive the add-on's C# parser, etc.

To answer your question, there is no C# dynamic lexer available from the add-on since it's a programmatic lexer.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) 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.