🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@kaoscript/parser

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kaoscript/parser

Parse kaoscript files and generate an abstract syntax tree

latest
Source
npmnpm
Version
0.7.0
Version published
Maintainers
1
Created
Source

@kaoscript/parser

kaoscript License NPM Version Dependency Status Build Status CircleCI Coverage Status

Parse kaoscript files and generates an abstract syntax tree.

Documentation available at kaoscript.

Evolution

  • July-August 2016: since I didn't wanted to handwriting the parser, I've used a LL(*) parser. Slow since lot of backtracking.

  • August 2016 - May 2017: I've used Jison to generate a SLR parser. Faster (10x) but the syntax was getting complex and tricky.

  • May 2017: I've tried chevrotain (a fast LL(4) parser).

    I didn't choice it because:

    • You have to distinguish ambiguous rules, complexify the syntax
    • You can't switch the tokenizer when parsing
  • May 2017 - *: Handwritten parser. It's basically a LL(1) parser with few lookheads.

    Advantages:

    • at least 2x times faster than Jison
    • manageable code
    • better support of space
    • macro

License

MIT © Baptiste Augrain

Keywords

kaoscript

FAQs

Package last updated on 07 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts