Opened 10 years ago

Closed 9 years ago

#10467 closed enhancement (fixed)

[Patch] regex in key conditions doesn't allow comparisons

Reported by: naoliv Owned by: simon04
Priority: normal Milestone: 15.10
Component: Core validator Version:
Keywords: mapcss Cc: lists@…


It seems that regex in key conditions [6547] doesn't allow comparisons.
For example:

*[/^source/ =~ /.*,.*/] {
        throwOther: tr("you should use ;");


org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " <REGEX> "/^source/ "" at line 512, column 3.
Was expecting one of:
    "set" ...
    <IDENT> ...
    <UINT> ...
    <STRING> ...
    "(" ...
    <UFLOAT> ...
    <HEXCOLOR> ...
    <S> ...
    "!" ...
    "+" ...
    "-" ...
    "!" ...
    <STRING> ...
    <IDENT> ...
    "set" ...
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.error_skipto(
	at org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.MapCSSParser.sheet(


Repository Root:
Build-Date: 2014-09-02 01:36:00
Last Changed Author: Don-vip
Revision: 7485
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last Changed Date: 2014-09-02 02:57:38 +0200 (Tue, 02 Sep 2014)
Last Changed Rev: 7485

Attachments (1)

10467.patch (6.3 KB ) - added by simon04 9 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by bastiK, 10 years ago

Type: defectenhancement

This syntax is not supported at the moment.

comment:2 by Aun Johnsen <lists@…>, 10 years ago

Cc: lists@… added

comment:3 by simon04, 9 years ago

Milestone: 15.10
Owner: changed from team to simon04
Status: newassigned
Summary: regex in key conditions doesn't allow comparisons[Patch] regex in key conditions doesn't allow comparisons

by simon04, 9 years ago

Attachment: 10467.patch added

comment:4 by simon04, 9 years ago

Any objections for yet another key/value/select/feature? :)

comment:5 by simon04, 9 years ago

Resolution: fixed
Status: assignedclosed

In 8874/josm:

fix #10467 - MapCSS: allow comparisons in regexp key conditions

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain simon04.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.