Skip to content

ldayton/bash-oracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

246 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bash-oracle

Patched bash shell that outputs AST as s-expressions instead of executing commands. Used as an oracle to validate Parable's parser output.

Usage

# Parse from stdin
echo 'echo hello' | ./bash-oracle /dev/stdin
# (command (word "echo") (word "hello"))

# Parse from -e flag
./bash-oracle -e 'echo hello'
# (command (word "echo") (word "hello"))

# Enable extended globbing (for patterns like @(foo|bar), +(x), etc.)
./bash-oracle --extglob -e 'echo @(foo|bar)'
# (command (word "echo") (word "@(foo|bar)"))

# Generate .tests files from a directory of scripts
./bash-oracle --write-tests /path/to/scripts /path/to/output

Building

just configure    # run once (mac only)
just build        # build mac binary (alias for build-mac)
just build-mac    # build mac binary
just build-linux  # build linux binary via Docker (x86-64)
just build-all    # build both in parallel
just check-binary # verify both binaries exist
just clean        # remove build artifacts
just release      # upload both to S3 in parallel

Downloads

# macOS (ARM64 and x86_64)
curl -sSfo bash-oracle http://ldayton-parable.s3-website-us-east-1.amazonaws.com/bash-oracle/macos/bash-oracle
chmod +x bash-oracle

# Linux x86_64
curl -sSfo bash-oracle http://ldayton-parable.s3-website-us-east-1.amazonaws.com/bash-oracle/linux/bash-oracle
chmod +x bash-oracle

# Patch
curl -sSfO http://ldayton-parable.s3-website-us-east-1.amazonaws.com/bash-oracle/linux/bash-oracle.patch

About

Bash fork for AST dumping and test generation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors