Skip to content
Mackenzie-HighPublic

About

Snowflake is a Parsing Expression Grammar (PEG) library and graphical parser-generator.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

78 Commits

Folders and files

Repository files navigation

Snowflake lets you interactively create PEG-based recursive-descent parsers via a GUI.

Quick Links:

Maven Dependency:

<dependency>
    <groupId>com.mackenziehigh</groupId>
    <artifactId>snowflake</artifactId>
    <version>2.0</version>
</dependency>

Hello World

Step: Download GUI from Maven Central:

Click Here to download the ready-to-run Snowflake JAR file.

Step: Run the GUI

java -cp snowflake-2.0.jar com.mackenziehigh.snowflake.designer.gui.MainWindow

The following window will appear on screen.

Java Swing Snowflake GUI

Step: Download the Demonstration Grammar:

Click Here to download the planet-demo.snow file.

Step: Open the Demonstation Grammar:

  • Click File -> Open Project
  • Select the planet-demo.snow file that you just downloaded in the previous step.

The GUI will be populated with the grammar and example from the planet-demo.snow file.

The example input is displayed on the Input tab of the GUI.

Java Swing Snowflake GUI with Grammar

Step: Parse the Example Input:

Click Action -> Parse on the GUI.

The grammar will be used to parse the example input and then the resulting parse tree will be displayed.

The nodes in the tree correspond to the matching grammar rules.

Click on nodes to see the portion of text corresponding to that node.

Java Swing Snowflake GUI with Grammar

Introduction to Parsing using PEGs

Here is a powerpoint presentation that will introduce you to parsing using Parsing Expression Grammars.

Example Projects

These projects include executable example programs that utilize Snowflake for parsing.

External Resources

About

Snowflake is a Parsing Expression Grammar (PEG) library and graphical parser-generator.

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages