I try to implement a parser and below statements should be found
if @loglevel < 1 or
@loglevel > 3
begin
dothis
dothat
end
else
foo
makethis
end
The parser should work with regular expressions and should return
condtion part (=> @loglevel < 1 or @loglevel > 3)
then part (=> everthing between begin dothis dothat end)
else part (=> everthing between else begin ....end)
Of course it should be possible that the code do not contain the else part
Is it possible to do this with on or more reqex's expressions or should I implement a sequenciell "readline parser"