I've got a bit of my parser going, and am now wondering what I should
parse the elements into. My initial thought was to extend FAMIX and
then create appropriate elements of it. I'm not sure that's
appropriate, and would appreciate some advice.
First, it looks as if the sample smalltalk parser uses the AST from RB,
and not the FAMIX models directly.
Second, there are clear differences between the FAMIX models and the
immediate parse results. For example, suppose I have a variable (or
dataset for SAS) named X. The parser may treat each as distinct, while
my model needs to describe the single entity to which each occurrence of
the name refers. That single entity will have much richer information
(relations to other variables, the block of source code in which the
variable is defined or referenced ....) than the parser would initially
care about.
On the other hand, I could use the FAMIX models in initially a
lightweight way; otherwise it seems I could end up with fairly
duplicative parser classes and model classes.
So, would it be best to parse directly into my model classes, or to
parse into some other AST that is later used to make the model?
Thanks.
Ross Boylan