Respect mathematical operation order piority with the exponent gnu extension

Obtained from:	OpenBSD
Approved by:	des (mentor)
This commit is contained in:
Baptiste Daroussin 2012-04-30 21:02:57 +00:00
parent 00f32ecbd0
commit bdb6d17264
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=234850

View File

@ -17,8 +17,8 @@
*
* $FreeBSD$
*/
#include <stdint.h>
#include <math.h>
#include <stdint.h>
#define YYSTYPE int32_t
extern int32_t end_result;
extern int yylex(void);
@ -35,9 +35,9 @@ extern int yyparse(void);
%left EQ NE
%left '<' LE '>' GE
%left LSHIFT RSHIFT
%right EXPONENT
%left '+' '-'
%left '*' '/' '%'
%right EXPONENT
%right UMINUS UPLUS '!' '~'
%%