Skip to content

A repo which serves as a learning ground for the Nom crate.

License

Notifications You must be signed in to change notification settings

sentinel1909/fun-with-nom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fun with Nom

This repo is created as a learning resource for the Nom crate for Rust. Nom is a parser combinators library. It can be used to parse just about anything, text, binary, whatever.

Right now, there isn't much to this project, but it will grow over time. I've spent the last week deep diving into this crate, mostly due to the desire to solve Day 6 of the Shuttle Christmas Code Hunt challenge (now called Shuttlings)

Concepts

Coming Soon...

Where I'm At

I understand how to compose the simple building block parsers.

Challenges to Overcome

I'm beginning to understand combinators. There is now a /count endpoint which accepts a plain text string of any length. The endpoint responds with the word count. Nom is leveraged here via calling a parser which returns the text input as a vector of words. The .len() method is then called to get the word count.

Nom Resources

I feel I've "reached the end of the internet" on what folks have written about regarding this crate. There just isn't that much out there. You have to be careful because much of the content is outdated. Better articles are:

Hand Crafting a Parser

It's worth knowing how to do this. I'm all hot to trot about Nom, but I think a good chunk of the issues I'm having stem from not knowing the basics.

About

A repo which serves as a learning ground for the Nom crate.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages