codehag / jsparagus

Parser generators

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rust NotImplemented Counter Fuzzbug days since Fuzzbug open

jsparagus - A JavaScript parser written in Rust

jsparagus is intended to replace the JavaScript parser in Firefox.

Current status:

Join us on Discord: https://discord.gg/tUFFk9Y

Getting started

make init
make all

(Note: This takes about 3 minutes to run on my laptop. Part of jsparagus is generated by a Python script, and the script is pretty slow. We're working on it!)

When it's done, you can:

  • Run make check to make sure things are working.

  • cd crates/driver && cargo run to test the JS parser and bytecode emitter.

Limitations

It's all limitations, but I'll try to list the ones that are relevant to parsing JS.

  • Lookahead assertions are limited to one token. (The JS grammar contains an occasional [lookahead != `let [`] and even [lookahead != `async [no LineTerminator here] function`].)

  • Error messages are poor.

  • No table compaction or table optimization. There's plenty of low-hanging fruit there.

About

Parser generators

License:Other


Languages

Language:Rust 61.8%Language:Python 37.3%Language:Shell 0.5%Language:Makefile 0.3%