Thanks but I need a parse, not a lexical scan. I am looking for all 
subexpressions, not just the tokens.

Jonathan

daz wrote:

> Jonathan Edwards wrote:
> 
>>Is there a parser for ruby syntax that identifies the exact ranges of
>>characters for each nonterminal? I need this to instrument ruby code.
>>Just getting line numbers is not adequate.
>>
>>Thanks,
>>Jonathan
> 
> 
> 
> Referring to example in www.ruby-talk.org/83656
> 
> If the token has an associated value, use length of value
> or start position of following token.
> 
> Comments are followed by TkNL.
> 
> Strings end where the next token begins
>   (e.g. TkSPACE / TkCOMMA ...)
> 
> 
> 
> daz
> 
> 
>