diff options
Diffstat (limited to 'xkbparse.y')
-rw-r--r-- | xkbparse.y | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -136,7 +136,7 @@ DoodadDef *doodad; XkbFile *file; } -%type <ival> Number Integer Float +%type <ival> Number Integer Float SignedNumber %type <uval> XkbCompositeType FileType MergeMode OptMergeMode KeySym %type <uval> DoodadType Flag Flags OptFlags %type <str> KeyName MapName OptMapName @@ -534,7 +534,7 @@ CoordList : CoordList COMMA Coord { $$= $1; } ; -Coord : OBRACKET Number COMMA Number CBRACKET +Coord : OBRACKET SignedNumber COMMA SignedNumber CBRACKET { ExprDef *expr; expr= ExprCreate(ExprCoord,TypeUnknown); @@ -746,6 +746,10 @@ KeySym : IDENT } ; +SignedNumber : MINUS Number { $$= -$2; } + | Number { $$= $1; } + ; + Number : FLOAT { $$= scanInt; } | INTEGER { $$= scanInt*XkbGeomPtsPerMM; } ; |