Created
June 23, 2010 14:45
-
-
Save Upliner/450013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%{ | |
// prolog | |
%} | |
%token LBRACKET | |
%token RBRACKET | |
%token LBRACE | |
%token RBRACE | |
%token LPARENS | |
%token RPARENS | |
%token COLON | |
%token SEMICOLON | |
%token COMMA | |
%token PERIOD | |
%token EQUALS | |
%token IDENTIFIER | |
%token NUMBER | |
%token COLOR | |
%start mapcss_document | |
%% | |
mapcss_document : rules; | |
rules : rule | rules rule; | |
rule : selectors styles; | |
styles : style | styles style; | |
style : LBRACE properties RBRACE; | |
properties : property | properties property; | |
property : IDENTIFIER COLON value SEMICOLON; | |
value : IDENTIFIER | NUMBER | COLOR; | |
selectors : selector | selectors COMMA selector; | |
selector : primitive opt_tag opt_class | primitive opt_tag opt_class primitive opt_tag opt_class; | |
primitive : 'node' | 'way' | 'relation' | |
opt_tag : | tag; | |
tag : LBRACKET IDENTIFIER EQUALS IDENTIFIER RBRACKET; | |
opt_class : | class | pseudoclass; | |
class : PERIOD IDENTIFIER; | |
pseudoclass : COLON IDENTIFIER; | |
%% | |
// epilog |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment