Skip to content

The Narcissus meta-circular JavaScript interpreter

License

Notifications You must be signed in to change notification settings

BrendanEich/narcissus

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Narcissus

Narcissus is a JavaScript interpreter written in pure JavaScript (i.e., a meta-circular evaluator), using the SpiderMonkey engine.

Originally a proof-of-concept by Brendan Eich, Narcissus is being revived as a test-bed for rapidly prototyping new language features for the JavaScript language (as well as the ECMAScript standard).

Usage

To run the Narcissus shell, install the SpiderMonkey shell and either set the NJS_SHELL environment variable to the path to the js executable, or creating a symbolic link to js in the top-level Narcissus directory. Then run Narcissus with the njs script.

Usage: njs

Options:
  -h, --help            show this help message and exit
  -f FILE, --file=FILE  JS file to load
  -e JS_EXPS, --expression=JS_EXPS
                        JS expression to evaluate
  -i, --interactive     enable interactive shell
  -H, --harmony         enable ECMAScript Harmony mode
  -S, --ssa             enable parse-time SSA construction

Dependencies

The front end of Narcissus, consisting of a lexer and parser (js{defs,lex,parse}.js), is written in portable ECMAScript Edition 3 code. The back end, consisting of the interpreter (js{ssa,exec}.js), is written using JavaScript extensions currently supported only by SpiderMonkey.

Development

More to come.

Contributors

  • Tom Austin
  • Brendan Eich
  • Andreas Gal
  • Shu-yu Guo
  • Dave Herman
  • Dimitris Vardoulakis
  • Patrick Walton

About

The Narcissus meta-circular JavaScript interpreter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%