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
Add :sub<...> precedence for operator precedence parser (<EXPR>).
  • Loading branch information
pmichaud committed Sep 8, 2010
1 parent 99fe6e2 commit c83336f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/cheats/hll-grammar.pir
Expand Up @@ -541,6 +541,11 @@ An operator precedence parser.
if inprec <= preclim goto term_done
inassoc = inO['assoc']

$P0 = inO['sub']
if null $P0 goto subprec_done
inO['prec'] = $P0
subprec_done:

reduce_loop:
unless opstack goto reduce_done
$P0 = opstack[-1]
Expand Down

0 comments on commit c83336f

Please sign in to comment.