Skip to content
Mathias edited this page Sep 14, 2010 · 6 revisions

parboiled for Java contains all of parboileds library elements except for all Scala classes. It is distributed as a single JAR named “parboiled4j-{version}.jar”.

These are the steps required for using parboiled for Java:

  1. Download the latest “parboiled4j-{version}.jar” and put it into your classpath
  2. Decide on the type V you would like your parser value stack to be parameterized with and create a custom parser class deriving from BaseParser
  3. Add one or more rule methods with return type Rule.
  4. Create an instance of your parser with a call to Parboiled.createParser
  5. Call the rule method of your parser that builds the root rule of your grammar to create the rule tree
  6. Choose one of the standard ParseRunner implementations and call its “run” method passing the root rule and the to-be-parsed input text.
  7. Inspect the different members of the returned ParsingResult object
Clone this wiki locally