Skip to content

Instantly share code, notes, and snippets.

@jagregory
Created October 21, 2008 23:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jagregory/18471 to your computer and use it in GitHub Desktop.
Save jagregory/18471 to your computer and use it in GitHub Desktop.
public void RebuildGitNumstatParser()
{
var contents = File.ReadAllText(@"..\..\..\SharpDiff\Parsers\GitNumstatParser.ometacs");
var result = Grammars.ParseGrammarThenOptimizeThenTranslate
<OMetaParser, OMetaOptimizer, OMetaTranslator>
(contents,
p => p.Grammar,
o => o.OptimizeGrammar,
t => t.Trans);
File.WriteAllText(@"..\..\..\SharpDiff\Parsers\GitNumstatParser.cs", result);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment