Skip to content

Latest commit

 

History

History
40 lines (35 loc) · 2.92 KB

README.md

File metadata and controls

40 lines (35 loc) · 2.92 KB

JavaPEG

PEG scannerless parser generator for Java 8

What's this?

Requirements:

  • Parser generator requires Java 8 to execute.
  • Output parser class may run on Java 7 unless it includes Java 8 features in action code.

Contents:

How to use:

  • Just invoke main function of Generator.java, then file chooser dialog will appear.
  • Choosing grammar file starts the generation.
  • In Eclipse environment, do refresh (F5) and then you can see the created Java file.
  • When generating derived parser (e.g. Derived.java), base parser (e.g. Base.java) must be created beforehand.

Unpolished features:

  • The generator does not fine check for input grammar.
  • Left recursion is not checked and may result in stack overflow.
  • Inappropriate grammar like ( symbol? )* is not checked and may result in infinite loop at runtime.