Ragel

From Seo Wiki - Search Engine Optimization and Programming Languages
Jump to navigationJump to search
Ragel
Developer(s) Adrian Thurston
Stable release 6.5 / 2009-05-18
Operating system Unix-like, Windows
Type State machine compiler
License GNU General Public License
Website [1]

Ragel is a finite state machine compiler with output support for C, C++, Objective-C, D, Java and Ruby source code. It supports the generation of table or control flow driven state machines from regular expressions and/or state charts and can also build lexical analysers via the longest-match method. A unique feature of Ragel is that user actions can be associated with arbitrary state machine transitions using operators that are integrated into the regular expressions. Ragel also supports visualization of the generated machine via graphviz.

File:Ragel visualisation.png

The above graph does the following: take a user input as a series of bytes. If in 48..57 (e.g. '0' to '9') it begins like a number. If 10 is encountered, we're done. 46 is the '.' and indicates a decimal number. 69/101 is uppercase/lowercase 'e' and indicates a number in scientific format. As such it will recognize properly:

2 45 055 46. 78.1 2e5 78.3e12 69.0e-3 3e+3

but not: .3 -5 3.e2 2e5.1

See also

External links

If you like SEOmastering Site, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...