From: Jonathan Edwards Date: 2003-12-13T10:12:03+09:00 Subject: Re: Ruby parser with character ranges 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 > > >