[ragel-users] setting the initial state

Adrian Thurston thurston at complang.org
Thu Apr 7 21:20:30 UTC 2011


I can't say when it will be done, but I can give you an issue number :)

http://www.complang.org/redmine/issues/256

-Adrian

On 04/06/2011 08:43 PM, Nate wrote:
> Hi Adrian and friends,
>
> I need to re-parse some input, starting at an offset and an initial
> state. I know I can just set "p" to the offset and "cs" to the state,
> however, my states are meaningful outside of the parser. My program is a
> language parser for syntax highlighting, so I need int constants that
> represent the type of tokens founds. I need some way of saying, "parse
> this char[] at offset X using initial token type LITERAL_CHAR". I don't
> care if the LITERAL_CHAR constant is the same as the parser state, but I
> need some way of setting "cs" to a specific machine name or label.
>
> I came across a post on the mailing list from 2007 saying, "For a really
> long time now I've been meaning to implement a new feature which should
> help you out. %% write entry <machine_or_label>;". This would work
> nicely I think. I guess it has been a *really* really long time now, eh?
> :D Is there any chance that this feature could be implemented soonly?
>
> Thanks!
> -Nate
>
> PS
> Ragel is so awesome! :)
>
>
>
> _______________________________________________
> ragel-users mailing list
> ragel-users at complang.org
> http://www.complang.org/mailman/listinfo/ragel-users

-- 
Adrian D. Thurston
http://www.complang.org/thurston/

_______________________________________________
ragel-users mailing list
ragel-users at complang.org
http://www.complang.org/mailman/listinfo/ragel-users



More information about the ragel-users mailing list