Created
November 17, 2019 07:59
-
-
Save QuantumFractal/22ef6321b3af94eaa7f2d7be011261e3 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
svg_grammar = ''' | |
start : prolog element | |
prolog: "<?xml" S? attr+ "?>" WS? | |
element: inline_tag | start_tag element end_tag | |
start_tag : S? "<" name S? attr+ ">" WS+ | |
end_tag : S? "</" name S? ">" WS+ | |
inline_tag : S? "<" name S? attr+ "/>" WS+ | |
letter : "a".."z" | "A".."Z" | "0".."9" | "-" | |
name : STRING | |
attr : name "=" attr_val S? | |
attr_val : ESCAPED_STRING | |
STRING : /[a-zA-Z0-9-_]+/ | |
S : WS_INLINE | |
%import common.WS_INLINE | |
%import common.ESCAPED_STRING | |
%import common.WS | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment