|
Home |
Download |
ANTLRWorks |
Wiki |
About ANTLR |
Feedback |
Support |
Bugs |
v2
|
|
|
Latest version is 3.0.1 Download now! » |
|
|
2007 Google Summer Of Code ANTLR Projects ANTLR is a well-known project and students will gain a wide, ready-made audience for their work. Part of my motivation for offering these projects is the imminent release of ANTLR v3, a complete rewrite that I have been working on fiendishly for 4 years. In May 2007, Pragmatic Programmers will publish The Definitive ANTLR Reference: Building domain-specific-languages. You might be interested also in ANTLRWorks, a highly successful grammar development environment written by a University of San Francisco graduate student. All projects must be released under the BSD license. With the
exception of the
gUnit -- Grammar Unit TestingSkills needed: Some experience with grammars, parsing, and tree construction. Possible you might need knowledge of Java reflection and Runtime.exec(). A one-student project.This project will do for grammar testing what jUnit did for unit testing. The idea is to provide a bunch of input output pairs for rules in a grammar. The output could be simply success or failure, a parse tree, an abstract syntax tree (AST), an expected syntax error, or even some text output.
rulename:
"..." -> OK
"..." -> a parse tree
"..." -> an AST
"..." -> FAIL
"..." -> EXCEPTION(NullPtrException)
"..." -> {condition must be true}?
"..." -> "some output string"
anotherrule :
....
For example
expr: "3+4" -> "7" "3+4" -> ^(+ 3 4) "-1" -> "-1" "3++9"-> FAIL Tasks:
Grammar (tree-based) gdiff ProgramSkills needed: Strong background in algorithms and data structures. Experience with revision control systems. Two students can work on this one together: one that built the parsers and another to handle the tree diff algorithm. I suspect the necessary algorithm is known: you might have to read some technical papers to figure them out. Reusing grammars is currently very difficult. The minute you add actions to a grammar it becomes very different from the original grammar lexically, even if the underlying grammar has not changed. To keep your grammar up-to-date, you would like to integrate changes from the "root" grammar on the ANTLR.org website. Because of the actions and other common formatting changes, simple revision control systems for grammars are insufficient. In some cases, you will have multiple tree grammars representing multiple phases in a complex translation. The tree grammar itself is identical for all phases because the trees are the same. But, the actions are different for every grammar. Changes to the structure of the tree currently requires manual changes across all tree grammars; clearly, this is an unacceptable situation.
I am looking for a student to write a ANTLR v3 grammarsSkills needed: Some experience with grammars would be helpful, but not necessary. You could use this opportunity to build grammars and parsing. Probably best with one student per project. It would be great to get students building grammars for the standard languages. I am open to grammars for any language. Here are a few that come to mind.
ANTLR v3 backends (Code Generators)Skills needed: Strong knowledge of parsing. It would be very helpful to have experience with ANTLR or another recursive descent parser generator such as JavaCC. One or more students could work on each backend. There are a number of language targets already for ANTLR that generate parsers in Java, Objective-C, C, C#, and so on. Each backend has two components: a runtime library and a group of code generation templates. No code is necessary to build a target; only templates (amazing, huh?!) Targets have just begun for:
Bring Python StringTemplate up to 3.0Skills needed: Knowledge of StringTemplate very helpful, obviously, but general knowledge of template engines would probably suffice. A one-student project. The C# and Java versions of StringTemplate are current, but the Python version is not. I would love to have a student bring the Python version up to date. |
|||||||||||||||||||||||||||||||||||||||||||||||