GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - elixir-tools/spitfire: Error tolerant parser for Elixir

BranchesTags
Open more actions menu

Latest commit

 

History

356 Commits
356 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
bin
bin
 
 
config
config
 
 
lib
lib
 
 
priv/plts
priv/plts
 
 
src
src
 
 
test
test
 
 
.credo.exs
.credo.exs
 
 
.dialyzer_ignore.exs
.dialyzer_ignore.exs
 
 
.envrc
.envrc
 
 
.formatter.exs
.formatter.exs
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitignore
.gitignore
 
 
.mise.toml
.mise.toml
 
 
.release-please-manifest.json
.release-please-manifest.json
 
 
.tool-versions
.tool-versions
 
 
CHANGELOG.md
CHANGELOG.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
flake.lock
flake.lock
 
 
flake.nix
flake.nix
 
 
mix.exs
mix.exs
 
 
mix.lock
mix.lock
 
 
release-please-config.json
release-please-config.json
 
 
test.ex
test.ex
 
 

Repository files navigation

Spitfire

Hex.pm Hex Docs

Spitfire is a new error resilient parser for Elixir.

The goal of the project is to make it easier for editor tooling to provide code intelligence for incomplete snippets of Elixir code.

Progress

  • Parse all Elixir Syntax into core compatible AST.
  • Error resilience
  • Environment querying API

Design

The project is a handwritten Pratt parser (a type of recursive descent parser). A hand written parser allows for better error tolerance as well as (hopefully) better error messages.

Pratt parsers are becoming very popular in the realm of error tolerant parsing. Projects that I have been watching and learning from include the rustc parser as well as the new Prism parser for the Ruby project.

Contributing

With the parser complete, the goal is now to improve error resilience, parsing speed, and improve the environment querying capabilities.

Acknowledgements

I'd like to thank Thorsten Ball, the author of Writing an Interpreter in Go. I read this book a couple of years ago and built out the language from the book. Thorsten teaches you how to build a Pratt parser, which is really proving helpful for the development of Spitfire.

License

MIT License

Copyright (c) 2023 Mitchell Hanberg

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Error tolerant parser for Elixir

www.elixir-tools.dev

Topics

elixirerlangotpparserpratt-parserrecursive-descent-parser

Resources

Readme
MIT license
Activity
Custom properties

Stars

103 stars

Watchers

5 watching

Forks

15 forks
Report repository

Releases

Sponsor this project

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.