Am 12.02.2006 um 14:08 schrieb Thomas Tempelmann:

Due to complications with morphe I only now managed to creat the first
part of the AST.

What is 'morphe' all about? Never heard of such a tool.

I decided to create the tree in text first. Here's a sample:

Line{declaration_stmt{Vars{dynamic;Var_Type{Var{ID{ofs}};Var_Value {ID{Integer};}}}};;}
Line{Do{};;}
Line{:={ID{ofs};.{Me;ID{allSrcReadOfs}}};;}
Line{While{<>{.{ID{allSrc};(){ID{Byte};ID{ofs}}};ID{MyEOLnChar}}};;}
Line{:={ID{ofs};+{ID{ofs};Literal{Integer;1}}};;}
Line{Wend;;}
Line{Loop{};;}

I hope you can see the relationship to this code:

  dim ofs as Integer
  do
    ofs = me . allSrcReadOfs
    while allSrc.Byte (ofs) <> MyEOLnChar
      ofs = ofs + 1
    wend
  loop

Don't know, what's the goal of your project. But modeling code using
'AST's as above might be suboptimal, since it doesn't model nesting
and scope of 'while' statements e.g.

Well, just a quick thought.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to