use console.warn instead of console.log

node.js's console.log() shim outputs to stdout, which means that
notices end up mixed with source code when doing make scaffold-tests
console.warn outputs to stderr, avoiding the issue.
detect more syntax errors (issue #24)

unfortunately it's necessary to peek the outputted AST to accomplish this, which may be unreliable. the same kludge is already used in isCallExpression()

the "caller can supply their own AST construction methods" feature probably needs to go. either that or some parsing functions need to return two values: one for the constructed AST and some for internal use - that would be rather wasteful.
fix testcases broken by previous commit
fix EBNF syntax in comments
fix lexer example (issue #25)