Due to complications with morphe I only now managed to creat the first
part of the AST.
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
Oh well, not nice but it proves that it works, at least :)
--
Thomas Tempelmann - exaggerating over a million times a day!
http://www.tempel.org/rb/ -- The primary source of outdated REALbasic
plugins and examples
Skype: tempel.org AIM: superTempel
_______________________________________________
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>