Newbi question: How should I approach my project?

SyntaxEditor .NET Languages Add-on for Windows Forms Forum

Posted 15 years ago by Nassim Farhat
Avatar
Hello, I am a beginner with the ActiPro tool with around 1 year of experience in C#. I had a few questions concerning how I should start my project using your tools. I spent the last 2 days reading up on the SyntaxEditor control, dynamic languages, programmatic lexical parsers etc...

Here is my context: I have a language which has already been defined previously (resembles a little BASIC language). I am using the Visual Studio 2008 shell with SDK to create add-ins and VSpackages. This add-in or VSPackage should be a language container for my language, so I will have a tabbed document opened in the IDE of VS2008 where inside I will probably drop the SyntaxEditor control as my language programming container. The compiler has already been created in previous versions of the software, so I guess I won't have to worry about the execution part too much, but nevertheless, I need to give the code a C# like feel and look (collapsing code segments, intelliprompt, color coding, outlining etc...) I saw that your tools give the possibility to do this very nicely.

The Dynamic Language approach examples I saw are pretty basic with color coding only on certain patterns of text entered (like the FTP example in your documentation).

For the advanced programmatic lexical parser, your documentation gives a good example with the "Simple" language that you have developed and given to everyone to use as reference.

I was wondering, should I use the Dynamic Language approach in order to get up and running quickly or should I use the more advanced programmatic lexical parser approach?

Can you please guide me in determining which is the best approach? I have a feeling I will need to develop a programmatic lexical parser, yet I find the "Simple" example a bit complicated. Can I find more help on how to use that example constructively and effectively? The thing I am doing right now is trying to change the grammar XML definition file for the "Simple" example and adapt it to my language so that I can then generate a SemanticParser for my own language. Yet, there are other classes in the SimpleAddon folder to consider (SimpleRecursiveDescentLexicalParser.cs, SimpleLexicalParser.cs, SimpleSyntaxLanguage.cs etc..) + classes in the AST folder to consider (Expression.cs, BlockStatement.cs, etc...). Which classes should I be modifying and which ones I should not be modifying, I have a hard time seeing the big picture since I find the dependencies a bit overwhelming. Is this more of an advanced programmers job? Or can a beginner with comfortable knowledge in C# but not that much experience do this?

Sorry for the long question, but these are my concerns
Regards Nassim

[Modified at 01/07/2009 10:45 AM]

Comments (3)

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

Dynamic languages really just mean that the lexical parser is using our pattern based lexer. Other than that, they can be used for any advanced purpose, even if our dynamic language samples don't show it like the Simple language sample does. The Web Languages Add-on's XML language with all of its automated IntelliPrompt, etc. is actually a dynamic language.

You could start off with the dynamic language to get started fast and then later swap in a programmatic lexical parser instead. The grammar XML file is something you would want to modify if you are doing semantic parsing. It will generate SimpleSemanticParser and all the AST node classes. You would modify the rest of C# code files by hand.

We are going to be working on making the creation of advanced languages a bit easier in future versions, since it is a complicated process now. Our hope is to have a tool that helps walk you through getting started.


Actipro Software Support

Posted 15 years ago by Nassim Farhat
Avatar
Thank you very much for your previous reply, this put things in perspectives for me. As I my hunch revealed it, I was going in the right direction.

In the same set of ideas, I have another question concerning the fluidity of connecting ActiPRO with the Visual Studio 2008 IDE using MS Services provided by the SDK.
For example, in ActiPro, can I easily integrate the following MS VS2008 SDK services and interfaces for performing the following actions:

-Find and Replace
-Breakpoints
-Bookmarks
-Callback Mechanism for notifying users on a task progression (ex. Find and replace in a large code segment)

I am fully aware that this might be out of your scope, yet, I have been searching on the internet for ways to accomplish this and in most of the cases I find nothing.

If you have any leads concerning this it would be greatly appreciated.

Thank you for your time and specially your support.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Nassim,

Sorry but our object model is designed independent of Visual Studio's. So you'd have to write code to translate things back and forth between object models.

For breakpoints and bookmarks you can use span indicators to show them in the UI.


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.