Ladies and Gentlemen,
I am in the process of creating a PEG parser generator in Unicon. I have
written some code that should be in a form that I can generate from
other code.
When the code is run, only the first part of the code is actually
executed. From what I can see the next parts in the code should execute
as it is using &
The code is as follows
procedure MatchComment()
return {
{
# this is executed
if found.Push(tab(match("#"))) then {
{
found.Pop()
}
write("First Part of MatchComment()")
# the result returned is "First Part of MatchComment()"
} else {
write("FAIL")
&fail
} &
{
# this is not
write("In MatchComment()")
} &
{
while write({
{
if found.Push(not MatchEndOfLine()) then {
{
found.Pop()
}
} else {
&fail
} &
if found.Push(MatchDOT()) then {
{
found.Pop()
}
} else {
&fail
}
}
}) do { }
{
&pos
}
} &
if found.Push(MatchEndOfLine()) then {
{
found.Pop()
}
} else {
&fail
}
}
}
end
Does anyone see any problem with what is set up? I have run tracing and
it shows that the only section outline above is being executed.
The code is formatted this way to allow me to generate parsers from
Templates for experimental purposes.
regards
Bruce Rennie
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Unicon-group mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/unicon-group