gSync - Grammar Diff and Merge Tool

About gdiff

gDiff is a tree-based 3-way diff/merge GUI tool for ANTLR v3 grammars. It can find and merge changes between two versions of an original base ANTLR grammar using information from the grammar's abstract syntax tree. Based on the diff results, gDiff can also do a 3-way merge to synchronize the changes in two version branches. Compared to a text-based diff algorithm, this tree-based one does better on fuzzy matching, pattern recognition, false-change reduction and version synchronization.

Screenshots

How to use

To run gSync, please put ANTLR runtime onto your classpath.

2-way Diff

  1. Start the Diff tool using command:
    $ java org.antlr.gsync.diff.Tool
  2. Double click the two panels to select proto and derived version of your grammar.
  3. Choose ignore options and execute diff.

3-way Merge

  1. Start the Merge tool using command:
    $ java org.antlr.gsync.Tool <proto.g> <derived.g> <revised.g>
  2. Check the merge tasks on the right-hand side to preview changes.

Download

gsync.jar