Skip to content
This repository has been archived by the owner on Feb 3, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct stacked postfixish operators.
  • Loading branch information
pmichaud committed Oct 20, 2009
1 parent 9bf6977 commit bcd5543
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cheats/hll-grammar.pir
Expand Up @@ -395,7 +395,7 @@ An operator precedence parser.
$P0 = $P0['OPER']
preO = $P0['O']
preprec = preO['prec']
$P0 = postfixish[0]
$P0 = postfixish[-1]
$P0 = $P0['OPER']
postO = $P0['O']
postprec = postO['prec']
Expand All @@ -404,7 +404,7 @@ An operator precedence parser.
$S0 = postO['uassoc']
if $S0 == 'right' goto pre_shift
post_shift:
$P0 = shift postfixish
$P0 = pop postfixish
push opstack, $P0
goto prepostfix_loop
pre_shift:
Expand All @@ -423,7 +423,7 @@ An operator precedence parser.

postfix_loop:
unless postfixish goto postfix_done
$P0 = shift postfixish
$P0 = pop postfixish
push opstack, $P0
goto postfix_loop
postfix_done:
Expand Down

0 comments on commit bcd5543

Please sign in to comment.