Copyright (C) 2015-2018 Matthew R. Wette

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.

something is broken wrt se parser:

(parse-se "function foo() { return 1; }") => (return (const 1))

regular parser works fine.  Is lalr restart not working ???

Also, using at command line you need to terminate expression with ';',
or add extra newline.

  javascript> 1+2;
  3
  javascript> 1+2
  ...
  3
  javascript>


should lexer cache a token?

define lexer (gen-lexer)
(parse lexer)
;; does parser need to pushback a token?


lexer should only turn one newline into semi so '\n' '\n' => ';'


new scope rules:
Functions can have vars anywhere at function top level
Blocks can only have lets at beginning
In fU for functions, sweep through the function and find re-decls
need (lookup-in-function to see if a repeated binding)