fixing the relative path to 'grammar'

This commit is contained in:
Jeremy Ashkenas 2010-03-16 19:36:08 -04:00
parent 12d8d70573
commit 391135b1a5
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
fs: require 'fs'
helpers: require('./helpers').helpers
helpers: require('./lib/helpers').helpers
CoffeeScript: require './lib/coffee-script'
# Run a CoffeeScript through our node/coffee interpreter.
@ -38,7 +38,7 @@ task 'build:full', 'rebuild the source twice, and run the tests', ->
task 'build:parser', 'rebuild the Jison parser (run build first)', ->
require.paths.unshift 'vendor/jison/lib'
parser: require('grammar').parser
parser: require('./lib/grammar').parser
js: parser.generate()
parser_path: 'lib/parser.js'
fs.writeFile parser_path, js

View File

@ -61,6 +61,7 @@
return fresh;
});
// Extend a source object with the properties of another object (shallow copy).
// We use this to simulate Node's deprecated `process.mixin`
helpers.extend = (extend = function extend(object, properties) {
var _a, _b, key, val;
_a = []; _b = properties;

View File

@ -1,13 +1,12 @@
(function(){
var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_BLOCK, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, INVERSES, Rewriter, SINGLE_CLOSERS, SINGLE_LINERS, _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, helpers, include, pair;
var __hasProp = Object.prototype.hasOwnProperty;
// The CoffeeScript language has a decent amount of optional syntax,
// implicit syntax, and shorthand syntax. These things can greatly complicate a
// grammar and bloat the resulting parse table. Instead of making the parser
// handle it all, we take a series of passes over the token stream,
// using this **Rewriter** to convert shorthand into the unambiguous long form,
// add implicit indentation and parentheses, balance incorrect nestings, and
// generally clean things up.
// The CoffeeScript language has a good deal of optional syntax, implicit syntax,
// and shorthand syntax. This can greatly complicate a grammar and bloat
// the resulting parse table. Instead of making the parser handle it all, we take
// a series of passes over the token stream, using this **Rewriter** to convert
// shorthand into the unambiguous long form, add implicit indentation and
// parentheses, balance incorrect nestings, and generally clean things up.
// Set up exported variables for both Node.js and the browser.
(typeof process !== "undefined" && process !== null) ? (helpers = require('./helpers').helpers) : (this.exports = this);
// Import the helpers we need.