Method summary
Methods
- __init__(self, lexicon)
- lex(self, text)
Yield (token_type, str_data) tokens.
The last token will be (EOF, None) where EOF is the singleton object defined in this module.
API Reference for Enthought Tool Suite 3.0.1
Break SVG path data into tokens.
The SVG spec requires that tokens are greedy. This lexer relies on Python's regexes defaulting to greediness.
This style of implementation was inspired by this article:
http://www.gooli.org/blog/a-simple-lexer-in-python/
Yield (token_type, str_data) tokens.
The last token will be (EOF, None) where EOF is the singleton object defined in this module.
© Copyright 2002-2008 Enthought, Inc.