Skip to content
This repository was archived by the owner on Sep 3, 2019. It is now read-only.
This repository was archived by the owner on Sep 3, 2019. It is now read-only.

MapCSS Lexer/Parser #286

@charlenni

Description

@charlenni

First of all: Thank you for sharing your code. It helped me a lot.

I want to ask, how well tested your code for the lexer/parser of MapCSS is tested. I encounter problems when reading the Mapnik mapnik.mapcss (mapnik.zip) file. There are some rules, that aren't interpreted correct. I use the original Antlr 3.5.0.2, because your 3.5.0.3 implementation for PCL doesn't support my used profile (profile111). Perhaps this is the reason?

The following two entries result in an empty rule

way::* {
    linejoin: miter;
    linecap: none;
}

at line 14 and

*::* {
    text-halo-color: white;
    text-anchor-horizontal: center;
    text-anchor-vertical: center;
}

at line 23 I get an "A recognition error occurred" error with text "<unexpected: [@86,667:667='*',<55>,14:5], resync=way::*>". It seems, that the lexer(?) has problems with the "*" at the end.

The other problem is at line 363

way|z13-14[waterway=stream][!tunnel?]::water_lines-casing,
way|z13-14[waterway=ditch][!tunnel?]::water_lines-casing,
way|z13-14[waterway=drain][!tunnel?]::water_lines-casing {
    color: white;
    width: 1.5;
    z-index: -1;
}

where I get an "A recognition error occurred" error with text "<unexpected: [@2340,6758:6758='?',<124>,363:35], resync=way|z13-14[waterway=stream][!tunnel?]::water_lines-casing>". There seems to be a problem with the OP_TRUTHY operator "?" at "!tunnel?". At other places the OP_TRUTHY operator without the negotiation works.

I know, this part of your work is a little bit older ( ;) ), but I hope, you could give me a short answer, if this code worked without errors for you.

Thank you for any help.

Best regards
Dirk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions