From a86e06a21691432d4b0bb8d1339c1378f83d5160 Mon Sep 17 00:00:00 2001 From: David Majda Date: Mon, 19 Apr 2010 19:54:28 +0200 Subject: [PATCH] Add "Generated by ..." message to the generated parsers. --- lib/compiler.js | 2 ++ lib/metagrammar.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/compiler.js b/lib/compiler.js index c460f51..be60080 100644 --- a/lib/compiler.js +++ b/lib/compiler.js @@ -441,6 +441,8 @@ PEG.Compiler = { var source = this.formatCode( "(function(){", + " /* Generated by PEG.js (http://pegjs.majda.cz/). */", + " ", " var result = {", " _startRule: ${startRule|string},", " ", diff --git a/lib/metagrammar.js b/lib/metagrammar.js index 642770d..e98023a 100644 --- a/lib/metagrammar.js +++ b/lib/metagrammar.js @@ -1,4 +1,6 @@ PEG.grammarParser = (function(){ + /* Generated by PEG.js (http://pegjs.majda.cz/). */ + var result = { _startRule: "grammar",