Skip to main content

VisualLangLab - A Visual Parser-Generator IDE

VisualLangLab is Java Posse Project of the week! (Episode 364)

VisualLangLab is a visual parser-generator IDE for developing parsers without any textual grammar specification (BNF/EBNF/PEG), script or code. It is simple in use, and easy to learn. Unlike other parser-generators, VisualLangLab represents parser rules as visual grammar-trees with distinct icons for the grammar-tree nodes as in the figures below. These example grammars are included with the VisualLangLab download (VLL4J.jar).

Examples from Programming in Scala, 2e (book) Examples from The Definitive ANTLR Reference (book)
The Expr grammar The factor grammar The stat grammar The func grammar

The grammar-trees are equivalent to PEGs, and can handle LL(*) grammars with left recursion. They are also executable, and can be run at any time at the click of a button. No additional code, skills, or tools are needed. Input for running the parser can be entered into the IDE or obtained from user-nominated files. This simplifies testing, and promotes an iterative-incremental development process that accelerates development. Optional semantic actions can also be associated with the grammar-tree's nodes.

Parser Development and Use

The parser development process is reduced to creating the equivalent grammar-tree(s) using menu-bar and context-menu operations of the GUI. Textual input from the keyboard is required only for naming the parser rules and tokens, and for specifying regular expression patterns for tokens. The grammar is saved as a XML file that can be reloaded for review, further editing or testing.

An API enables client programs in any JVM language to load the XML file and regenerate the parser. Parser combinators are used to turn tree (or XML) data directly into a parser at run-time without code-generation, so parser regeneration is very fast.

Applications that have all their logic within the grammar (as actions) can be run without additional effort or coding by using the command-line runner. The runner is activated with a saved grammar file and the user-provided input-data. It instantiates a parser from the grammar, and then runs it to process the input-data. The parser's output is printed to the console.

VisualLangLab leverages parser combinators to produce backtracking, recursive-descent parsers with packrat capability.

FAQ, Documents and Forum

Check out the FAQ. Depending on your perspective, you may also find some of the following pages interesting:

ManagerGrammar/Domain ExpertApplication Developer
Download, Install and Run
Examples
User Guide
The GUI
Sample Grammars
Testing Parsers
Download, Install and Run
Examples
User Guide
The GUI
Sample Grammars
Editing the Grammar Tree
Testing Parsers
Download, Install and Run
Examples
The GUI
Sample Grammars
AST and Action Code
Testing Parsers
Using the API
Relationship with Scala Parser Combinators
Rapid Prototyping for Scala
A Quick Tour

If you want to report an issue, request help, or just show off a new parser, post a message at the VisualLangLab HELP forum.

Download, Installation, and Running

For all practical purposes, you only need VLL4J.jar.

For more details, see Download Install and Run.

Prerequisites

The only prerequisite is a 6.0+ JRE. You can create, modify, run, and test parsers within the IDE without any other software or tool.

License

VisualLangLab is distributed under the GNU General Public License, Version-3. Any grammars and token-libraries you create using VisualLangLab are of course your own.

History

VisualLangLab was born on 5th March 2004 as A Visual LL(K) Parser Generator. This first version was written in Java, and can still be found here. The software was usable by mid-2004, and an interesting application is described in this java.net article published in early October 2004.

The availability of Scala and its built-in parser-combinators prompted a re-write, and a Scala version was published under this java.net project on 10th March 2010. Although all of the code was re-written (in Scala), the essential character of the GUI remains the same.

A Java version with the same internal design as the Scala version but independent of Scala was released in January 2012.

 
 
Close
loading
Please Confirm
Close