[ragel-users] properties list
Adrian Thurston
thurston at complang.org
Wed Dec 23 04:02:35 UTC 2009
Torsten Curdt wrote:
>
> One thing that still seems problematic are escaped quotes though.
>
> "this here \"test\" is a"
key = '" ( [^\\"] | '\\' any )* '"';
> Cool, I came up with something very similar. But now I have changed it to
>
> comment_c = "/*" @comment ((any @comment_append)* - (any* "*/" any*)) "*/";
> comment_cpp = "//" @comment (any - "\n")* @comment_append "\n";
>
> Thanks for the pointer.
>
> It just seems that my @comment_append method is not positioned correctly.
> I am still getting a trailing "*" for the "comment_c". Not sure I
> understand why.
Go further into the chapter. These can simplify to:
comment_c = '/*' any* :>> '*/';
comment_cpp = '//' any * :> '*/';
> Sounds like converting UTF16 -> UTF8 and then use the proper byte
> sequences might be a little easier.
> I found the character sequence definitions here:
>
> http://git.wincent.com/wikitext.git?a=blob;f=ext/wikitext_ragel.rl
>
> Is there any other example available somewhere?
If you haven't seen it already, look at the ruby script in contrib. It
is relevant.
Regards,
Adrian
More information about the ragel-users
mailing list