Re: Short hand expression operators

2010-03-24 Thread Philip Herron
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hans Aberg wrote: > Have you tried just adding %token PLUSPLUS "++" .. expr: expr "++" > .. etc. with some %prec, possibly %left, %right? > > Hans > Thanks that works i feel a bit silly when i look at something like my exp "==" exp its a similar idea

Re: Short hand expression operators

2010-03-24 Thread Hans Aberg
On 25 Mar 2010, at 00:34, Philip Herron wrote: I was just thinking until now in my language i haven't allowed operators like '++' or '+=' etc. Though in the Lex and Yacc book i took the example of using: '-' express %prec UMINUS inline with my usual: exp '+' exp etc, so this allows '-2 + x' a

Short hand expression operators

2010-03-24 Thread Philip Herron
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey guys I was just thinking until now in my language i haven't allowed operators like '++' or '+=' etc. Though in the Lex and Yacc book i took the example of using: '-' express %prec UMINUS inline with my usual: exp '+' exp etc, so this allows '-2