Commit 1c3e2ecb authored by Taddeüs Kroes's avatar Taddeüs Kroes

Added some support for xross-browser compatibility hacks

parent 9f135688
......@@ -25,7 +25,7 @@ let unicode = '\\' h(h(h(h(h(h)?)?)?)?)? wc?
let escape = unicode | '\\'[^'\r' '\n' '\012' '0'-'9' 'a'-'f' 'A'-'F']
let nmstart = ['_' 'a'-'z' 'A'-'Z'] | nonascii | escape
let nmchar = ['_' 'a'-'z' 'A'-'Z' '0'-'9' '-'] | nonascii | escape
let string1 = '"'([^'\n' '\r' '\012' '"'] | '\\'nl | escape)*'"'
let string1 = '"' ([^'\n' '\r' '\012' '"'] | '\\'nl | escape)* '"'
let string2 = '\'' ([^'\n' '\r' '\012' '\''] | '\\' nl | escape)* '\''
let mystring = string1 | string2
let badstring1 = '"' ([^'\n' '\r' '\012' '"'] | '\\'nl | escape)* '\\'?
......@@ -71,6 +71,8 @@ let X = ['x' 'X']
let Y = ['y' 'Y']
let Z = ['z' 'Z']
let uagent = ('-' ("webkit" | "moz" | "ms" | "o") '-')?
rule token = parse
| s { S }
......@@ -94,7 +96,7 @@ rule token = parse
| "@charset " { CHARSET_SYM }
| '@' F O N T '-' F A C E { FONT_FACE_SYM }
| '@' N A M E S P A C E { NAMESPACE_SYM }
| '@' K E Y F R A M E S { KEYFRAMES_SYM }
| '@' uagent K E Y F R A M E S { KEYFRAMES_SYM }
| '@' S U P P O R T S { SUPPORTS_SYM }
| (w | comment)* w A N D w (w | comment)* { SUPPORTS_AND }
......@@ -141,4 +143,5 @@ rule token = parse
| eof | '\000' { EOF }
| _ { token lexbuf }
| _ as c { raise (SyntaxError ("unexpected '" ^ Char.escaped c ^ "'")) }
......@@ -251,7 +251,9 @@ pseudo:
declaration:
| name=property S* COLON S* value=expr important=boption(ig2(IMPORTANT_SYM, S*))
{ (String.lowercase name, value, important) }
%inline property: name=IDENT { name }
%inline property:
| name=IDENT { name }
| STAR name=IDENT { "*" ^ name } (* IE7 property name hack *)
expr:
| l=exprl { concat_terms l }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment