Discussion:
[ragel-users] Ignoring whitespace
Tom Harris
2013-04-09 23:30:34 UTC
Permalink
Greetings,

I am trying out a recursive parser using fret & fcall for the first time,
so far it is all working!

What I am having trouble with is so simple, I just want to ignore
whitespace, so whitespace may serve to seperate symbols. Is there an easy
way to do this, other than just adding space* all over the grammar?
--
Tom Harris <celephicus at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.complang.org/pipermail/ragel-users/attachments/20130410/40f6f672/attachment.html>
RU
2013-04-10 07:20:07 UTC
Permalink
Essentially, yes.

jg
Michael Conrad
2013-04-12 13:55:24 UTC
Permalink
Post by Tom Harris
What I am having trouble with is so simple, I just want to ignore
whitespace, so whitespace may serve to seperate symbols. Is there an
easy way to do this, other than just adding space* all over the grammar?
You can always pre-process your buffer, converting all runs of
whitespace to a single space character. That will make the required
machine smaller. Written in C, it might even be a speed improvement.

-Mike

Loading...