-
Notifications
You must be signed in to change notification settings - Fork 156
Java Parser
oschrenk edited this page Sep 8, 2012
·
6 revisions
This example lives in the package org.parboiled.examples.java and showcases a full-blown Java 1.6 parser.
This examples demonstrates many of parboileds features (no actions, however) and shows that parboiled can handle even large and complex grammars, like the Java 1.6 grammar. The example code parses all java source files in the parboiled source distribution and outputs some basic performance indicators like files, lines and characters parsed per second.
This Java 6 PEG grammar can give you many clues as to how effectively build larger PEG grammars and codify them in parboileds internal java DSL. Parsing Java from Java has never been easier…
- 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