parcon.railroad.raildraw | index /home/jcp/github/parcon/parcon/railroad/raildraw.py |
This module provides support for drawing railroad diagrams created by
parcon.railroad (which usually creates them from Parcon parsers) into image
files or other locations.
It's possible to use this module and parcon.railroad as standalone modules to
create syntax diagrams for things unrelated to Parcon. I'll write up
documentation on how to use this module separate from Parcon at some point.
A simple example of how to use this module is present in the module
documentation of parcon.railroad.
This module requires Cairo and PyCairo in order to function. These must be
installed separately from Parcon; both Cairo and PyCairo are available for
Windows, Linux, and Mac. A Google search should turn up information on where to
download and install both. (If it doesn't, go to pypi.python.org/pypi/parcon
and send an email to the email address you find there.)
This module also requires Pango and PyGTK (for the Pango bindings). A similar
Google search should turn up information on how to install these.
If you're on Ubuntu, all of the above dependencies can be installed via
apt-get; I'll get a list of the specific packages to install up here soon.
Modules | ||||||
|
Functions | ||
|
Data | ||
bold_font = <PangoFontDescription> bold_italic_font = <PangoFontDescription> default_line_size = 2 division = _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192) draw_functions = {<class 'parcon.railroad.Nothing'>: <function draw_Nothing>, <class 'parcon.railroad.Then'>: <function draw_Then>, <class 'parcon.railroad.Or'>: <function draw_Or>, <class 'parcon.railroad.Token'>: <function draw_Token>, <class 'parcon.railroad.Loop'>: <function draw_Loop>, <class 'parcon.railroad.Bullet'>: <function draw_Bullet>} italic_font = <PangoFontDescription> plain_font = <PangoFontDescription> size_functions = {<class 'parcon.railroad.Nothing'>: <function size_of_Nothing>, <class 'parcon.railroad.Then'>: <function size_of_Then>, <class 'parcon.railroad.Or'>: <function size_of_Or>, <class 'parcon.railroad.Token'>: <function size_of_Token>, <class 'parcon.railroad.Loop'>: <function size_of_Loop>, <class 'parcon.railroad.Bullet'>: <function size_of_Bullet>} title_font = <PangoFontDescription> |