[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: are there user defined infix operators?
From: |
Uxio Prego |
Subject: |
Re: are there user defined infix operators? |
Date: |
Thu, 8 Nov 2018 22:34:31 +0100 |
> You cannot use Bison to resolve dynamically your precedence if
> you have a free set of levels. But if you have a fixed number
> of level, say 10, [...]
Fixed number seems perfectly enough to me.
> you could define ten tokens for each level,
> map each operator to the corresponding level, storing the actual
> operator as a semantic value. The scanner could use a map for
> instance to decide to which token you map each operator.
>
> That wouldn't be of much help if you also want to play with
> associativity. Maybe using even more tokens to denote the different
> possibilities.
I didn't understand all of this at first, but after reading the Hans
example too, I think I understand every part of this now. Thank you!
I'm not going to exploit this right now, but I rest assured to know
a way to explore if I ever need to get there.
- are there user defined infix operators?, Uxio Prego, 2018/11/02
- Fwd: are there user defined infix operators?, Uxio Prego, 2018/11/02
- Re: are there user defined infix operators?, Hans Åberg, 2018/11/08
- Re: are there user defined infix operators?, Hans Åberg, 2018/11/08
- Re: are there user defined infix operators?, Uxio Prego, 2018/11/08
- Re: are there user defined infix operators?, Hans Åberg, 2018/11/08
- Re: are there user defined infix operators?, Uxio Prego, 2018/11/10
- Re: are there user defined infix operators?, Hans Åberg, 2018/11/10