Skip to content

Generality in both parsing and generating, should the json library technique be emulated? #2568

Answered by hurufu
jjtolton asked this question in Q&A
Discussion options

You must be logged in to vote

I also find handling white spaces troublesome when I work with DCGs. You might consider 2 passes: first "lexer" that normalizes spaces and new lines, and then second pass with an actual grammar. Also consider to relax your grammar a little to be able to handle errors more gracefully.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@aarroyoc
Comment options

@jjtolton
Comment options

@hurufu
Comment options

Answer selected by jjtolton
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants