Constructor for Parser objects
| Parameters: |
|
|---|
Returns a Genshi Stream.
| Parameters: |
|
|---|
Returns the final output string (e.g., xhtml). See generate() for named parameter descriptions.
Left over keyword arguments (kwargs) will be passed to Genshi’s Stream.render() method, overriding the corresponding attributes of the Parser object. For more infomation on Streams, see the Genshi documentation.
Creates a callable object for parsing macro argument strings
>>> from dialects import creepy20_base
>>> my_parser = ArgParser(dialect=creepy20_base())
>>> my_parser(" one two foo='three' boo='four' ")
(['one', 'two'], {'foo': 'three', 'boo': 'four'})
A parser returns a two-tuple, the first item being a list of positional arguments and the second a dictionary of keyword arguments. Argument values are either strings or lists.
Constructor for ArgParser objects
| Parameters: |
|
|---|
Parses the arg_string returning a two-tuple
Keyword arguments (kwargs) can be used to override the corresponding attributes of the ArgParser object (see above). However, the dialect attribute cannot be overridden.