Parsing
Parsing is the analysis of input according to structural or syntactic rules to identify its components and produce a structured, usable representation.
Functional Programming in Scala, Second Edition
Parsing is the process of analyzing an input sequence according to a grammar or other syntactic rules to recognize its structure and produce a result.
- How it is used
- Builds structured recognizers from primitive parsers while using parsing to practice algebraic API design.
- How deep it goes
- Develops laws, combinators, JSON construction, error behavior, and stateful implementation details rather than stopping at grammar notation.
- Examples
- Uses repeated letters, magic-word alternatives, JSON documents, digit-counted `a` sequences, and CSV date-temperature rows.
- What you can do after
- Build it from scratch: design a parser algebra, compose a JSON parser, and implement parsers with errors, consumption, and backtracking.
Read how Functional Programming in Scala, Second Edition explains parsing →
Write Powerful Rust Macros
Parsing is the process of analyzing an input sequence according to a grammar and constructing its syntactic structure.
- How it is used
- Turns procedural-macro and DSL token input into custom structs before code generation or infrastructure work.
- How deep it goes
- Works through hierarchical Parse implementations, lookahead, custom keywords, diagnostics, and validation while deferring cloud-resource creation.
- Examples
- Uses Hello-derived macro input, a bucket-and-lambda infrastructure DSL, parsed structs, and compiler error outputs.
- What you can do after
- Build it from scratch by implementing Parse for nested DSL structs with token checks, errors, and post-parse validation.
Build Financial Software with Generative AI (From Scratch)
Parsing is the process of analyzing structured input and converting it into accessible data elements according to its format.
- How it is used
- Converts ACH record lines into named fields for payment-file loading and later processing.
- How deep it goes
- Works through fixed-width field extraction, unit tests, malformed inputs, and batch-flow integration rather than format specification details.
- Examples
- Uses file headers, batch headers, entry details, addenda, sample ACH files, expected dictionaries, and pytest assertions.
- What you can do after
- Build it from scratch by separating ACH record parsers, testing expected fields, and integrating verified routines into file loading.
Read how Build Financial Software with Generative AI (From Scratch) explains parsing →
The Quick Python Book, Fourth Edition
- How it is used
- Extracts usable fields from delimited records and patterned text lines.
- How deep it goes
- Works through splitting, csv.reader, and regular-expression extraction, including optional fields and quoted delimiters, without developing a general parser.
- Examples
- Uses temperature records with pipe or comma delimiters and name-and-phone records with optional components.
- What you can do after
- Apply it via Python’s split(), csv.reader(), and re module to extract fields from records.
Read how The Quick Python Book, Fourth Edition explains parsing →
Refactoring to Rust
parse is a Rust string operation that converts textual data into a value of an inferred or specified target type.
- How it is used
- Uses string parsing to convert RPN calculator operands into integers before evaluation.
- How deep it goes
- Explains generic target selection and parse-error handling, but stops short of parsing internals.
- Examples
- Demonstrates parsing operands such as `3` and `4`, rejecting `hello`, and feeding valid values into an RPN stack.
- What you can do after
- Build it from scratch by parsing calculator operands and propagating invalid-number errors.
Build AI-Enhanced Web Apps
Document parsing is the extraction and structural interpretation of content from files such as PDFs or DOCX documents.
- How it is used
- Feeds document summarization and RAG workflows by converting uploaded PDF and DOCX files into cleaned, searchable content.
- How deep it goes
- Explains extraction problems, normalization steps, image gaps, and secure processing, but stops short of implementing a complete parser.
- Examples
- Uses PDFs, DOCX files, tables, footnotes, annotations, images, headers, footers, and uploaded knowledge-base documents as examples.
- What you can do after
- Diagnose parsing quality problems, normalize extracted content, and operate a secure document-ingestion flow for vector search.
Julia as a Second Language
Parsing is the process of interpreting a textual representation to produce a value of a specified type.
- How it is used
- Converts text read from files or keyboard input into typed values usable in calculations and data records.
- How deep it goes
- Works through typed conversions and a line-by-line CSV loader, then adds numeric bases; defers more elaborate CSV-reading approaches.
- Examples
- Uses pizza-sales rows, Boolean strings, numeric type choices, and the different interpretations of `"101"` across bases.
- What you can do after
- Apply it via Julia’s `parse` to turn selected input fields into numeric or Boolean values and choose a numeric base when needed.
Go by Example
Parse is a book-specific function that parses a URL into a URL value and reports an error when the URL lacks a scheme.
- How it is used
- Converts URL strings into fields for a small package client and its tests.
- How deep it goes
- Works through a two-step strings.Cut implementation and error path, without handling missing paths separately.
- Examples
- Uses https://github.com/inancgumus and https://github.com to parse fields and test URL reassembly.
- What you can do after
- Build it from scratch with strings.Cut, returning a URL pointer on success and an error for a missing scheme.
Logs and Telemetry
Parsing is the transformation of textual or encoded content into a structured representation according to its syntax.
- How it is used
- Uses extracted log values to enrich payloads, route events, protect sensitive data, and support remediation.
- How deep it goes
- Explains operational purposes and Fluent Bit configuration, but defers detailed filter capabilities and parser-specific attributes.
- Examples
- Uses regex parser definitions, Java-style error logs, and Fluent Bit input-filter-output configurations.
- What you can do after
- Apply it via Fluent Bit by defining parsers, attaching them through a parser filter, and routing the resulting events.
Natural Language Processing in Action, Second Edition
A parser is a software component that analyzes text to identify its structural parts and the relationships among them.
- How it is used
- Helps natural-language software identify sentence structure and relationships for downstream NLP tasks.
- How deep it goes
- Defines structural analysis and its purpose, but stops short of describing parsing algorithms or implementation details.
- Examples
- Contrasts natural-language sentences with programming-language instructions and executable machine code.
- What you can do after
- Evaluate/understand how parsers expose sentence structure without treating them as complete natural-language compilers.
Read how Natural Language Processing in Action, Second Edition explains parsing →
Kotlin in Action, 2E
- How it is used
- Uses parsing as the middle stage of JSON deserialization, between lexical analysis and reflective object construction.
- How deep it goes
- Explains token categories, semantic elements, and callback behavior while leaving final object creation to deserialization.
- Examples
- Uses nested book-and-author JSON and a JsonObject callback interface to illustrate parsed values, objects, and arrays.
- What you can do after
- Understand how JSON text progresses from characters to tokens, semantic structures, and final Kotlin objects.
API Design Patterns
Parsing is the process of analyzing a serialized or textual representation according to syntax rules to produce a structured or executable form.
- How it is used
- Uses parsing to interpret string-based API filters before evaluating matching resources.
- How deep it goes
- Contrasts server parsing with client-constructed schemas and shows equivalent transformations, but stops short of parser implementation.
- Examples
- Demonstrates ChatRoom SQL and MongoDB filters covering equality, comparison, conjunction, membership, and disjunction.
- What you can do after
- Evaluate equivalent string and structured filter designs against usability and future flexibility.
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
Text parsing is the process of analyzing textual content to identify, extract, or transform structured information.
- How it is used
- Supports administrative work by extracting actionable information from command output and textual files.
- How deep it goes
- Contrasts text parsing with PowerShell objects and introduces regular expressions without covering regex comprehensively.
- Examples
- Uses process listings, process identifiers, command output, and log files as parsing examples.
- What you can do after
- Apply it via regular expressions and shell text tools to extract information from command output or log files.
Related concepts
- custom keywordimplemented by · A custom keyword is a syntax token declared through syn's custom_keyword macro that implements parsing and lookahead support for a DSL-specific keyword.
- projectional editingcontrasts with · A language-editing technique that manipulates and presents a structured language model directly rather than parsing text into that model.
- regular expressionused by · A formal pattern notation that describes sets of strings and enables text to be matched, searched, extracted, or transformed.
- abstract syntax treeproduces · An abstract syntax tree is a hierarchical tree representation of the syntactic structure of parsed source code or other language input, typically omitting superficial formatting details.
- newlineuses · A newline is a character or character sequence that marks the boundary between consecutive lines of text.
- or combinatorused by · The or combinator runs a second parser when the first parser fails without consuming committed input, and otherwise returns the first parser's result.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.












