public void RebuildGitParser() { var contents = File.ReadAllText(@"..\..\..\SharpDiff\Parsers\GitDiffParser.ometacs"); var result = Grammars.ParseGrammarThenOptimizeThenTranslate <OMetaParser, OMetaOptimizer, OMetaTranslator> (contents, p => p.Grammar, o => o.OptimizeGrammar, t => t.Trans); File.WriteAllText(@"..\..\..\SharpDiff\Parsers\GitDiffParser.cs", result); }
public static void RebuildParser() { var contents = File.ReadAllText(@"..\..\..\SExpression\SExpression.ometacs"); var result = Grammars.ParseGrammarThenOptimizeThenTranslate <OMetaParser, OMetaOptimizer, OMetaTranslator> (contents, p => p.Grammar, o => o.OptimizeGrammar, t => t.Trans); File.WriteAllText(@"..\..\..\SExpression\GeneratedCode\SExpressionParser.cs", result); }