.. -*-rst-*-

Ragel Examples for Go
=====================

These examples serve the following purposes:

- Help you learn Ragel
- Test the correctness of the code I wrote for Ragel
- Benchmark Ragel's performance on your machine
- And hopefully give you some code you can steal ;]

To get started you should first ``make install`` ragel.  Then navigate
to this directory and run::

    make

To automatically compile/test/benchmark these examples.

The following examples are provided:

- atoi.rl: Convert string to integer (very simple)
- rpn.rl: Reverse polish notation calculator (simple)
- url.rl: Very fast and robust HTTP/SIP URL parser (very complicated)

To see graphviz diagrams of the state machines generated by Ragel in
these examples, run the following commands::

    sudo apt-get install xdot
    make graph

Those diagrams (along with the pdf manual) are super important for
troubleshooting and simplifying your Ragel code.

I truly hope these examples help you in your personal and professional
endeavors.  If you have any questions my email is: jtunney@gmail.com
