Hand-rolling a parser in Scheme for EBNF (already made the tokenizer!)

In the Gist, I have explained my problem, and I have provided my tokenizer as well. If you can help me with the parser, that would be great. Also if my tokenizer is not very well-structured, please tell me.

btw the tokenizer is written in extremely portable Scheme. I think Chez is the best interpreter for Scheme.

madnificent,

github.com/mu-semtech/sparql-parser contains an EBNF parser for SPARQL, an LL(1) language. You might be able to borrow code, not sure how well it translates to scheme. GitHub asked me to log in to see the gist so I’d have to have a peek later.

sparql-ast folder contains the relevant bits regarding the parsing.

cerement,
@cerement@slrpnk.net avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • programming@programming.dev
  • Durango
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • khanakhh
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • everett
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ethstaker
  • osvaldo12
  • modclub
  • normalnudes
  • provamag3
  • tester
  • anitta
  • Leos
  • megavids
  • lostlight
  • All magazines