Hello
All
Not sure whether
this is the right forum for this question - please excuse and point me in the
right direction if I'm wrong.
I have been
playing with Moose 4.8, downloaded last October, mainly because I am interested
in PetitParser. I have been constructing fairly trivial parsers to get to
understand the system. I took as an example a typical HTML tag, i.e. any
text enclosed in angle brackets <>. My first attempt
was:
($< asParser,
$> asParser not star, $> asParser).
This seemed to send
the parser into a loop, except in the case where there was no text between the
brackets. Floundering around, I tried:
($<
asParser, (PPPredicateObjectParser anyExceptAnyOf: '>') star, $>
asParser).
This worked as
expected, but I was not happy with the apparent clumsiness of the middle term.
So I tried:
($<
asParser, (PPPredicateObjectParser char: $>) not star, $>
asParser).
This again sent the
parser into a loop.
It looks as though I
have some fundamental misunderstanding of the function of 'not' in a parser, or
else it is not working as specified. Could someone kindly explain to an
inquisitive idiot what is going wrong?
Many thanks in
advance
Peter
Kenny