mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-15 02:01:39 +03:00
Disambiguate Parser.y so we don't need to rely on operator precedences.
This commit is contained in:
parent
5b912afe5a
commit
f53c1f8777
@ -148,12 +148,6 @@ import Paths_cryptol
|
||||
|
||||
%right '->'
|
||||
%right '#'
|
||||
%left '+' '-'
|
||||
%left '*'
|
||||
%right '^^'
|
||||
%right NEG '~'
|
||||
%left '@'
|
||||
%left OP
|
||||
%%
|
||||
|
||||
|
||||
@ -658,8 +652,11 @@ tysyn_params :: { [TParam PName] }
|
||||
| tysyn_params tysyn_param { $2 : $1 }
|
||||
|
||||
type :: { Type PName }
|
||||
: app_type '->' type { at ($1,$3) $ TFun $1 $3 }
|
||||
| type op app_type { at ($1,$3) $ TInfix $1 $2 defaultFixity $3 }
|
||||
: infix_type '->' type { at ($1,$3) $ TFun $1 $3 }
|
||||
| infix_type { $1 }
|
||||
|
||||
infix_type :: { Type PName }
|
||||
: infix_type op app_type { at ($1,$3) $ TInfix $1 $2 defaultFixity $3 }
|
||||
| app_type { $1 }
|
||||
|
||||
app_type :: { Type PName }
|
||||
|
Loading…
Reference in New Issue
Block a user