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
|
||||
%%
|
||||
|
||||
|
||||
@ -657,10 +651,13 @@ tysyn_params :: { [TParam PName] }
|
||||
: tysyn_param { [$1] }
|
||||
| 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 }
|
||||
| app_type { $1 }
|
||||
type :: { Type PName }
|
||||
: 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 }
|
||||
: dimensions atype { at ($1,$2) $ foldr TSeq $2 (reverse (thing $1)) }
|
||||
|
Loading…
Reference in New Issue
Block a user