ram 7.0.0

A library that helps to parse source code with finite state machines
Documentation
# Rustastic Automaton

`ram` allows you to ease the creation of a language lexer based on finite state machines.

## Supporting Ram

The development and maintenance of Ram is made possible thanks to the support of generous backers. If you'd like to participate in its funding, you can:

- [Back the project on Patreon]https://www.patreon.com/conradkdotcom
- [Make a pledge on Liberapay]https://liberapay.com/conradkdotcom/

## Usage

Add `ram` as a dependency in Cargo.toml:

```toml
[dependencies]
ram = "6.0"
```

Import the `ram` crate and use the `Automaton` struct to create a language lexer. In this example, we are lexing a language that has no tokens other than the "End of source" token:

```rust
extern crate ram;

use ram::Automaton;

enum TokenType {
    End,
}

// Create the FSM (2 states, 0 or 1) that will parse the source code
let mut am = Automaton::new(0, 1);
// When the FSM hits the end of the source, go to state 1, the final state
am.find_end(TokenType::End as i32, 0, 1);

// Run the FSM with an empty string as the source code
let source_code = format!("");
let runner = am.run(source_code);

// Print the parsed tokens to the console
println!("{:?}", runner.tokens);
```

There are multiple `find_*` methods to your disposal, like `find_regex` or `find_whitespace` or
even `find_automaton`, which allows you to combine various finite state machines together
to create more powerful tokenizers.

The full API documentation is available at [https://docs.rs/ram](https://docs.rs/ram).

## License

The source code is released under the Apache 2.0 license.