diff options
author | Andriy Gapon <avg@icyb.net.ua> | 2006-10-29 02:59:53 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-10-29 02:59:53 +0300 |
commit | d920bbadb94684287f70e50ded2a35d65186c188 (patch) | |
tree | a3f2a152be18b59b1223159a2f60b999fe52424c /xkbparse.y | |
parent | 0e8fd676de161ba52bb4544f8641be756bc580a1 (diff) |
parser: accept negative numbers in geometry co-ordinates (bug #8763)
Accept negative co-ordinates for geometry, per the spec.
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; } ; |