vorpaljs / Bash Parser
Licence: mit
Parses bash into an AST
Stars: ✭ 151
Programming Languages
javascript
184084 projects - #8 most used programming language
bash
514 projects
Projects that are alternatives of or similar to Bash Parser
Libpypa
libpypa is a Python parser implemented in pure C++
Stars: ✭ 172 (+13.91%)
Mutual labels: ast, parse
asmdot
[Unstable] Fast, zero-copy and lightweight (Arm | Mips | x86) assembler in (C | C++ | C# | Go | Haskell | Javascript | Nim | OCaml | Python | Rust).
Stars: ✭ 23 (-84.77%)
Mutual labels: parse, ast
Snapdragon
snapdragon is an extremely pluggable, powerful and easy-to-use parser-renderer factory.
Stars: ✭ 180 (+19.21%)
Mutual labels: ast, parse
parse-function
(!! moved to tunnckoCore/opensource multi-package repository !!) 🔱 Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins.
Stars: ✭ 37 (-75.5%)
Mutual labels: parse, ast
BBob
⚡️Blazing-fast js-bbcode-parser, bbcode js, that transforms and parses to AST with plugin support in pure javascript, no dependencies
Stars: ✭ 133 (-11.92%)
Mutual labels: parse, ast
lilt
LILT: noun, A characteristic rising and falling of the voice when speaking; a pleasant gentle accent.
Stars: ✭ 18 (-88.08%)
Mutual labels: parse, ast
abstract-syntax-tree
A library for working with abstract syntax trees.
Stars: ✭ 77 (-49.01%)
Mutual labels: parse, ast
eval-estree-expression
Safely evaluate JavaScript (estree) expressions, sync and async.
Stars: ✭ 22 (-85.43%)
Mutual labels: parse, ast
astutils
Bare essentials for building abstract syntax trees, and skeleton classes for PLY lexers and parsers.
Stars: ✭ 13 (-91.39%)
Mutual labels: parse, ast
Swiftpascalinterpreter
Simple Swift interpreter for the Pascal language inspired by the Let’s Build A Simple Interpreter article series.
Stars: ✭ 270 (+78.81%)
Mutual labels: ast, parse
pascal-interpreter
A simple interpreter for a large subset of Pascal language written for educational purposes
Stars: ✭ 21 (-86.09%)
Mutual labels: parse, ast
Micromark
the smallest commonmark compliant markdown parser that exists; new basis for @unifiedjs (hundreds of projects w/ billions of downloads for dealing w/ content)
Stars: ✭ 793 (+425.17%)
Mutual labels: ast, parse
Deku
Declarative binary reading and writing: bit-level, symmetric, serialization/deserialization
Stars: ✭ 136 (-9.93%)
Mutual labels: parse
Ml
sourced.ml is a library and command line tools to build and apply machine learning models on top of Universal Abstract Syntax Trees
Stars: ✭ 136 (-9.93%)
Mutual labels: ast
Libnmea
Lightweight C library for parsing NMEA 0183 sentences
Stars: ✭ 146 (-3.31%)
Mutual labels: parse
Down
Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark.
Stars: ✭ 1,895 (+1154.97%)
Mutual labels: ast
bash-parser
Parses bash source code to produce an AST
Installation
npm install --save bash-parser
Usage
const parse = require('bash-parser');
const ast = parse('echo ciao');
ast
result is:
{
type: "Script",
commands: [
{
type: "SimpleCommand",
name: {
text: "echo",
type: "Word"
},
suffix: [
{
text: "ciao",
type: "Word"
}
]
}
]
}
Related projects
-
cash - This parser should become the parser used by
cash
(and also vorpal) -
nsh - This parser should become the parser used by
nsh
-
js-shell-parse - bash-parser was born as a fork of
js-shell-parse
, but was rewritten to use ajison
grammar - jison - Bison in JavaScript.
Documentation
Look in documents folder
License
The MIT License (MIT)
Copyright (c) 2016 vorpaljs
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].