Skip to content

Example of combining Alex (lexical parser) and Happy (syntax parser)

License

Notifications You must be signed in to change notification settings

helvm/happy-alex-example

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

happy-alex-example

Alex + Happy + Lazy ByteString

Quick start: stack build && stack exec -- happy-alex-example

This is based mostly on my own work plus some bits from happy-plus-alex [1].

Some things to consider (when comparing with the more nicely written happy-plus-alex):

  • I'd like to leave as much as possible outside of the .x and .y files.
  • It is possible to pass the token position to the parsed result (see the construction of Let).
  • Type-safe error wrapper.
  • Uses lazy ByteString instead of String
  • ghc-mod emacs syntax checking works only if you generate some nasty symlinks: (see TIPS)

[1] https://github.com/dagit/happy-plus-alex

About

Example of combining Alex (lexical parser) and Happy (syntax parser)

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

Packages

No packages published

Languages

  • Haskell 56.3%
  • Logos 29.1%
  • Yacc 14.6%