Language Definition vs. Code File Output

SyntaxEditor for WPF Forum

Posted 8 years ago by Nassim Farhat
Version: 11.2.0551
Avatar
Hello,

I have a few questions in regards to the language tool's auto-generated code files:

1- What is the advantage of using the auto-generated code files instead of the dynamic XML definition file? Are there some features that cannot be attained by using the dynamic XML definition file vs using the auto-generated files?

2- How far do the auto-generated code files go? In regards to these categories:
Lexer
Parser
Tagger
Syntax Languages
AST

3- How wasy is it to creat an AST code file? Do those auto-generated code files make it easier to create an AST?

Regards
Nassim

Comments (1)

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

1) In terms of a dynamic lexer, the code-based one will just be slightly faster to load than from XML since parsing XML takes longer. But both will contain the same lexing data, classification tagging capabilities, and example text provider.

2) For code generation, the Language Designer helps in these areas:

Dynamic lexer (full implementation)
Programmatic lexer (ID classes only)
Token tagger
Classification type provider
Example text provider
Syntax language stub class that can load all those things

The Language Designer can also generate type-specific AST node classes. If you will be using our LL(*) Parser Framework, we recommend you generate the AST node classes with the Language Designer since it only takes a few things as input and creates complicated AST class files that work perfectly with our parser framework.


Actipro Software Support

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