[Ironruby-core] Match operator

Curt Hagenlocher curt at hagenlocher.org
Sun Oct 14 19:28:50 EDT 2007


On 10/14/07, Sanghyeon Seo <sanxiyn at gmail.com> wrote:
>
> 2007/10/15, Curt Hagenlocher <curt at hagenlocher.org>:
> > I don't see any evidence in
> > src\IronRuby\Compiler\Parser\Parser.y that these symbol
> > combinations are recognized as distinct tokens.
>
> But the stacktrace shows Ruby.Compiler.Parser.Parse, so I assumed it's
> crashing while parsing. Am I wrong?


 Hmm.. I had assumed that the parser was recognizing this as
<value><equals><binary negation><value>.  I was wrong, and these symbols are
actually defined as MATCH and NMATCH in the grammar.  Their implementation,
however, is commented out:

| arg MATCH arg
{
//$$ = new MatchExpression($1, $3, @$);
}
| arg NMATCH arg
{
//$$ = new NotExpression(new MatchExpression($1, $3, @$), @$);
}
There does not actually appear to be any implementation of the
MatchExpression class.

--
Curt Hagenlocher
curt at hagenlocher.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071014/021b37a1/attachment.html 


More information about the Ironruby-core mailing list