The Wild World of Parsing
The Wild World of Parsing
by James Edward Gray II (JEG2)
The vast majority of all programming challenges involve dealing with some manner of input. You might be performing database queries, reading data files, or asking a user to please stop typing the word "chickens" and just enter a number. Making sense of what we are given is a task that we never fully escape.
In this installment from How to Train Your Scrappy Programmer, we will explore various parsing strategies that can decode the gnarliest of inputs. We will cover:
- How three standard functions can go a long way
-
Using pattern matching to add safety to your code
- Some basic elements of regular expressions
- Lexical analysis and tokenizing inputs
- Recursive descent parsing
- The big guns: the lexer and parser generators leex, yecc, and NimbleParsec
By the end of this interactive guide, you will have solved a moderate parsing challenge using four different techniques. We leave it up to you to decide which one is your fave.
Share
Purchase Bundled with Four Other Chapters
-
How to Train Your Scrappy Programmer
Regular price $44Regular priceUnit price / per
Who Is This For?
This lesson is intended for any programmer who wants to learn several styles of parsing. This guide has light references to some topics covered in previous guides. It is assumed that the reader will be comfortable with the use of Kino inputs, Stream iterators, binary pattern matching, and simple regular expressions.
Expert level knowledge is not required. The free sample includes a code test that will help you decide if you are ready for this content. For those who aren't, links to free guides are included to help get you up to speed.
* This product requires a Livebook installation. There's a free desktop app for macOS and Windows.
Try Before You Buy
A free sample is available that includes simple installation instructions, the table of contents, an introduction, one complete guide, a conclusion, and the occasional joke or two. Almost all code samples in the guide are written in the Elixir programming language, but know that this is an interactive environment where you can run, edit, and rerun all the code you see inline and view the results live. You are strongly encouraged to explore this sample to see if this content is right for you.
About the Author
James has been a developer and manager of developers for around two decades. In both roles, teaching programming has always been a big focus of his work. James cares deeply about design, practical examples, visualization of algorithms, and how to train fluency.
James co-wrote Designing Elixir Systems with OTP with Bruce Tate, who's one heck of a nice guy. He has been a prominent member of the Elixir and Ruby communities, delivering books, documentation, and numerous conference talks. He has trained programmers all over the world.
We're Not Satisfied Until You're Satisfied
If you are unsatisfied with your purchase for any reason, just send us a message letting us know why — so we can improve in the future — and we will refund your money.