summaryrefslogtreecommitdiff
path: root/xkbparse.y
diff options
context:
space:
mode:
Diffstat (limited to 'xkbparse.y')
-rw-r--r--xkbparse.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/xkbparse.y b/xkbparse.y
index b50b9e8..662325b 100644
--- a/xkbparse.y
+++ b/xkbparse.y
@@ -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; }
;