Stack of parse position per grammar rule.
sealed class
|
ParserContextStack
|
Position stacks are used to detect left-recursion.
Pops the topmost parse position from the stack.
public
method
|
Pop
()
|
||
type
|
int32
|
||
returns
|
The maximum stack depth (only for informational purposes). |
Pushes the given parse position onto the stack.
public
method
|
Push
(int32 position)
|
||
type
|
bool
|
||
params
|
position
|
The zero-based parse position. | |
returns
|
true
if
parsing
shall
continue,
false
if
a
left-recursion
has
been
detected
and
the
current
rule
shall
be
skipped.
|
Remarks:
The
Pop
method
must
be
called
once
for
each
call
to
the
Push
method
that
has
returned
true
.