Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Version: 4.0.0245
Avatar
It looks like I'm going to have to write my own parser in order to make life easier for me with some of the goofy language rules we need (as the language isn't really LL(1)) and it will be easier for me in the long run to have total control of the error handling & recovery, match order, recursion rules, etc.

That said, I'm trying to figure out if I really need to use expose the IAstNode interface from my AST. Can you give me a laundry list of all the built-in functionality that requires my objects to implement this interface?

At the very least, I can think of the automatic outlining node parser, but I'm not sure what else.

Thanks,

Kelly Leahy Software Architect Milliman, USA

Comments (3)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Outlining is a big one but a mostly, the IAstNode is just a really nice framework that you can use for implementing IntelliPrompt population code and determining context for your language. All those sorts of things are written in your code though.

Couple notes, even though a language isn't LL(k), a lot of times you can tweak some things to make it work almost all the time. For instance C# definitely isn't LL(k) but we were able to do some complex peek operations at times where there is ambiguity to make a good guess at what is happening and it works pretty well.

Even if you do write your own parser, you can use our AstNodeBase class since that will have a lot of AST node core code that you would probably have to write on your own anyhow. It would be a time saver.


Actipro Software Support

Posted 12 years ago by Kelly Leahy - Software Architect, Milliman
Avatar
True, I could use your AstNodeBase implementation, or I may reimplement those few things I need from it (recursive searching, visitor support, etc.) using the generics support of C# 2.0. I have built my own ASTs a few times in C#, and there are a lot of nice ways of doing this in 2.0 that couldn't be used for 1.1, so I'd like to take advantage of them - it'll make hand-coding the node classes much easier.

Also, another thing - is the visitor stuff used anywhere besides the outlining support and the recursive searching for nodes?

Kelly

Kelly Leahy Software Architect Milliman, USA

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
No I don't believe so.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 9 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.