File: README.md

package info (click to toggle)
arpeggio 2.0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,480 kB
  • sloc: python: 3,198; javascript: 54; sh: 19; makefile: 9
file content (23 lines) | stat: -rw-r--r-- 654 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Simple C-like language example

In this example a simple C-like language is parsed.

Program example is contained in `program.simple` file.

To run example do:

```bash
$ python simple.py
```

This example runs in debug mode (`debug` is `True` in `ParserPEG` constructor
call) and detailed log is printed and `dot` files are produced.  `dot` files
will be named based on the root grammar rule.

You can visualize `dot` files with some dot file viewers (e.g.
[ZGRViewer](http://zvtm.sourceforge.net/zgrviewer.html)) or produce graphics
with `dot` tool (you need to install [GraphViz](http://www.graphviz.org/) for that)

```bash
$ dot -Tpng -O *dot
```