Ragel

Ragel compiles executable finite state machines from regular languages
Download

Ragel Ranking & Summary

Advertisement

  • Rating:
  • License:
  • GPL
  • Price:
  • FREE
  • Publisher Name:
  • Adrian Thurston
  • Publisher web site:
  • http://research.cs.queensu.ca/~thurston/ragel/
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 950 KB

Ragel Tags


Ragel Description

Ragel compiles executable finite state machines from regular languages Ragel compiles executable finite state machines from regular languages. Ragel targets C, Objective-C, D, C++, Java and Ruby. Ragel state machines can not only recognize byte sequences as regular expression machines do, but can also execute code at arbitrary points in the recognition of a regular language. Code embedding is done using inline operators that do not disrupt the regular language syntax.The core language consists of standard regular expression operators (such as union, concatenation and Kleene star) and action embedding operators. The user's regular expressions are compiled to a deterministic state machine and the embedded actions are associated with the transitions of the machine. Understanding the formal relationship between regular expressions and deterministic finite automata is key to using Ragel effectively.Ragel also provides operators that let you control any non-determinism that you create, construct scanners, and build state machines using a statechart model. It is also possible to influence the execution of a state machine from inside an embedded action by jumping or calling to other parts of the machine, or reprocessing input.Ragel provides a very flexible interface to the host language that attempts to place minimal restrictions on how the generated code is integrated into the application. The generated code has no dependencies.What kind of task is Ragel good for?· Writing robust protocol implementations.· Parsing data formats.· Lexical analysis of programming languages.· Validating user input.Here are some key features of "Ragel":· Construct finite state machines using: regular language operators, state chart operators, a scanner operator, some mix of the above· Embed actions into machines in arbitrary places.· Control non-determinism using guarded operators.· Minimize state machines using Hopcroft's algorithm.· Visualize output with Graphviz.· Use byte, double byte or word-sized alphabets.· Generate C, C++, Objective-C, D, Java or Ruby code with no dependencies.· Choose from table or control flow driven state machines. What's New in This Release: · A bug in graphviz generation was fixed. · A bug related to 64-bit systems and machines defined with hex numbers was fixed. · The build system was moved to automake.


Ragel Related Software