mapcss provides an antlr based parser and a Dart framework for parsing and manipulating MapCSS stylesheets.
See the MapCSS Workbench in action ( NOTE: currently alpha ).
Some editors/renderers accept raw content as declaration values. Sample styles sheet include for instance the following declarations:
font-family: DejaVu Sans Book; icon-image: icons/place.png;
In mapcss these values have to be included in quotes:
font-family: "DejaVu Sans Book"; icon-image: "icons/place.png";
Creating an AST
promp: dart bin/mapcss.dart --ast stylesheet.mapcss
to dump an abstract syntax tree for the stylesheet
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
See LICENSE file.