Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 11 Next »

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


3-way merge window (Ubuntu)


Wizard window for 2-way diff


2-way diff result (MacOSX)

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:
      $ java -jar ./gdiff.jar
  2. In the wizard window, open the grammar files and click the "diff" button.

skip the wizard

Usage:
    java org.antlr.gsync.diff.Tool [-f|-t|-d] [after] [before] [options]
    -f: fast GUI view
    -t: text result
    -d: write DOT script to stdout
    [options] is the combination of 'r', 'a', 'o' 
    r: ignore rewrites
    a: ignore actions
    o: ignore options
For example:
$ java org.antlr.gsync.diff.Tool -f My_v2.g My_v1.g rao
  • No labels