| Crates.io | chapter3_lexical |
| lib.rs | chapter3_lexical |
| version | 0.2.1 |
| created_at | 2025-06-11 01:38:21.365118+00 |
| updated_at | 2025-06-13 17:51:36.09856+00 |
| description | A lexical analyzer that returns the tokens you wrote! |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1707980 |
| size | 21,713 |
In this chapter we explored lexical analysis. The programming exercise problem 1 asked us to create a lexical analyzer for a set of tokens and attribute values brought up in figure 3.10
I decided to make this analyzer print out your tokens at the end, along with show you in real time what the last token type it recognized was.
You can install from crates.io! Simply run cargo install chapter3_lexical and you will have the project.
To run this crate, simply use (assuming default paths)
/home/USER/.cargo/bin/chapter3_lexical to runchapter3_lexicalIf your path differs please note I am using the default path assumption, it is up to you to run it from a custom path.
Add a flag to ignore the introduction text if you'd like quicker access to the live lexing.
Simply run your rust program with whichever path you need (I will show as if the path is in your shells $PATH)
chapter3_lexical -q
chapter3_lexical --quick
Using either flag -q or --quick you can bypass the introduction
To stop input you have a few options, such as
ctrl+c