Re: Some random reflections on tpr05a
[email protected] (Jason Parker-Burlingham)
| Newsgroups | perl.golf |
|---|---|
| Message-ID | <[email protected]> |
Rick Klement <[email protected]> writes: > This one uses Parse::Yapp. > Here's a rpn.y: > > %left '+' '-' > %left '*' '/' > > %% > expr: NUMBER > | '-' NUMBER { "-$_[2]" } > | expr '+' expr { "$_[1] $_[3] +" } Wait. Parse::Yapp handles left-recursive grammars? Ah, it's LALR. Nifty. -- ||----|---|------------|--|-------|------|-----------|-#---|-|--|------|| | ``Ooooaah! | | I'm getting so excited about cheese-making I can't stand it!'' | ||--|--------|--------------|----|-------------|------|---------|-----|-|