https://github.com/psfried/scala-parser-combinators
Example implementation of parser combinators in scala, using Pants as the build system
https://github.com/psfried/scala-parser-combinators
Last synced: about 1 year ago
JSON representation
Example implementation of parser combinators in scala, using Pants as the build system
- Host: GitHub
- URL: https://github.com/psfried/scala-parser-combinators
- Owner: psFried
- Created: 2016-11-17T19:28:02.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-17T20:11:27.000Z (over 9 years ago)
- Last Synced: 2025-02-10T15:50:45.960Z (over 1 year ago)
- Language: Scala
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Parser Combinators in Scala
===========================
This is an example implementation of parser combinators in Scala. Parts of it are naive and amateurish, but serves the purpose of an example.
If you're unfamiar with the benefits of using parser combinators, then you should take a look at the [example json parser](src/main/scala/com/paxata/parsercombinators/Json.scala) that fits roughly in one screen height. It's really not a complete json parser implementation, but it does show how expressive and terse the code can be.
The code has some comments, so check out the source to learn more.
## Pants
This code is build using [Pants](http://www.pantsbuild.org). To run all the tests, run: `./pants test src/test/scala/com/paxata/parsercombinators`. Pants will bootstrap itself, so you don't need to install it. It just requires python 2.7 to be installed and on the PATH.