Skip to content

writeonly/scallion

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SCALL1ON

Overview

Scallion is a library for writing parsers and pretty printers for LL(1) languages in Scala.

Documentation

A comprehensive Scaladoc API is available online.

Parsing Algorithm

Scallion uses a novel parsing algorithm that we have described in the paper: LL(1) Parsing with Derivatives and Zippers. The algorithm has been formally proven correct in Coq.

Examples

  • JSON: This example showcases how to build a basic JSON lexer & parser using Scallion.
  • Lambda Calculus: This example shows how to get a pretty printer almost for free alongside your parser.
  • Calculator: This example shows how to use the operators combinator to easily handle operators with various associativities and priorities.
  • Roman Numerals: This example presents a simple parser and pretty printer for roman numerals.

About

LL(1) parser combinators in Scala

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%