From: Wolfgang Bumiller Date: Sat, 16 Nov 2013 13:26:46 +0000 (+0100) Subject: ** precedence was wrong X-Git-Tag: xonotic-v0.8.0~90 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9131644412862ff540058f473b7c752686e46e01;p=xonotic%2Fgmqcc.git ** precedence was wrong --- diff --git a/lexer.h b/lexer.h index 44f6491..2b5a741 100644 --- a/lexer.h +++ b/lexer.h @@ -185,13 +185,13 @@ static const oper_info c_operators[] = { { "++", 1, opid3('+','+','P'), ASSOC_RIGHT, 16, OP_PREFIX, false}, { "--", 1, opid3('-','-','P'), ASSOC_RIGHT, 16, OP_PREFIX, false}, - { "**", 2, opid2('*','*'), ASSOC_RIGHT, 15, 0, true}, + { "!", 1, opid2('!','P'), ASSOC_RIGHT, 15, OP_PREFIX, true}, + { "~", 1, opid2('~','P'), ASSOC_RIGHT, 15, OP_PREFIX, true}, + { "+", 1, opid2('+','P'), ASSOC_RIGHT, 15, OP_PREFIX, false}, + { "-", 1, opid2('-','P'), ASSOC_RIGHT, 15, OP_PREFIX, true}, +/* { "&", 1, opid2('&','P'), ASSOC_RIGHT, 15, OP_PREFIX, false}, */ - { "!", 1, opid2('!','P'), ASSOC_RIGHT, 14, OP_PREFIX, true}, - { "~", 1, opid2('~','P'), ASSOC_RIGHT, 14, OP_PREFIX, true}, - { "+", 1, opid2('+','P'), ASSOC_RIGHT, 14, OP_PREFIX, false}, - { "-", 1, opid2('-','P'), ASSOC_RIGHT, 14, OP_PREFIX, true}, -/* { "&", 1, opid2('&','P'), ASSOC_RIGHT, 14, OP_PREFIX, false}, */ + { "**", 2, opid2('*','*'), ASSOC_RIGHT, 14, 0, true}, { "*", 2, opid1('*'), ASSOC_LEFT, 13, 0, true}, { "/", 2, opid1('/'), ASSOC_LEFT, 13, 0, true},