-
Notifications
You must be signed in to change notification settings - Fork 156
JSON Parser
2beaucoup edited this page Sep 21, 2012
·
6 revisions
The JSON Parser example lives in the org.parboiled.examples.json package and shows a complete JSON Parser built with parboiled for Scala.
It builds an AST representation of the parsed JSON source and exercises many of parboileds features. As such it is a very good starting point for your own parboiled for Scala project.
The three contained Scala classes contain the following parser versions:
Class | Parser |
---|---|
JsonParser0 | Basic recognizer grammar without any actions |
JsonParser1 | Full JSON parser with actions building an AST |
JsonParser2 | Same as JsonParser1 but with most types being made explicit (rather than inferred), worth a look if JsonParser1 is unclear |
- Introduction
- ... Motivation
- ... Features
- ... Simple Java Example
- ... Simple Scala Example
- ... RegEx vs. parboiled vs. Parser Generators
- ... Projects using parboiled
- Installation
- Concepts
- ... The Big Picture
- ... The Rule Tree
- ... The Value Stack
- ... The Parse Tree
- ... AST Construction
- ... Parse Error Handling
- parboiled for Java
- ... Rule Construction in Java
- ... Parser Action Expressions
- ... Working with the Value Stack
- ... Action Variables
- ... Parser Extension in Detail
- ... Style Guide
- ... Java Examples
- ...... ABC Grammar
- ...... Calculators
- ...... Time Parser
- ...... Java Parser
- ...... Markdown processor
- parboiled for Scala
- ... Rule Construction in Scala
- ... Parser Actions in Scala
- ... Parser Testing in Scala
- ... Scala Examples
- ...... Simple Calculator
- ...... JSON Parser
- Advanced Topics
- ... Handling Whitespace
- ... Parsing Performance Tuning
- ... Indentation Based Grammars
- ... The ProfilingParseRunner
- ... Grammar and Parser Debugging
- ... Thread Safety
- Building parboiled
- parboiled-core Javadoc API
- parboiled-java Javadoc API
- parboiled-scala Scaladoc API
- Change Log
- Patch Policy