Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 Image Added

Image Removed
3-way merge window (Ubuntu)

Image Removed
Wizard window for 2-way diff

Image Removed
2-way diff result (MacOSX)

Image Added

Image Added

How to use

  1. Download the gSync from the attachment in this page.
    • If using Mac OS or Windows, you can double-click gsync.jar to run
    • For command line, change dir to the dist folder and type in:
      No Format
      $ java -jar ./gdiff.jar
  2. In the wizard window, open the grammar files and click the "diff" button.

skip the wizard

...

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

2-way Diff

  1. Start the Diff tool using command:
    No Format
    $ java org.antlr.gsync.diff.Tool

...

For example:

...

  1. Double click the two panels to select proto and derived version of your grammar.
  2. Choose ignore options and execute diff.

3-way Merge

  1. Start the Merge tool using command:
    No Format
    $ java org.antlr.gsync.

...

  1. Tool 

...

  1. <proto.g> <derived.g> <revised.g>
  2. Check the merge tasks on the right-hand side to preview changes.

Download

gsync.jar