[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby Lex Specification

Vasco Andrade e silva

10/30/2007 1:02:00 PM

Hi,

Where can i find a ruby (1.8.6) syntax specification? If that
specification means a file in the source, no problem for me.

Thanks,
Vasco Andrade e Silva
--
Posted via http://www.ruby-....

4 Answers

Vasco Andrade e silva

10/30/2007 1:31:00 PM

0

Thanks Jason.

Correct me if i'm wrong but doesn't yacc (or the parser) need something
before it (like lex or a tokenizer) to 'tokenize' the text?

I can identify the tokens in parse.y but i was looking for a
"specification" for them. Example: if i see "class" probably i want to
create the token kCLASS, but i wanted to be sure..

Vasco Andrade e Silva
--
Posted via http://www.ruby-....

Gaspard Bucher

10/30/2007 3:02:00 PM

0

Waou!!

I am currently writing a parser for a simple command line. (chose to
use lemon instead of bison). I had a look at the file you mentioned.
This is impressive. Expressivity and freedom for the programmer means
hard work for the developer (syntax for lisp is really smaller).
Thanks Matz for choosing expressivity.

Gaspard

2007/10/30, Jason Roelofs <jameskilton@gmail.com>:
> parse.y is your source. (http://svn.ruby-lang.org/repos/ruby/tru...)
>
> There is no official Ruby spec (yet), but it is slowly being worked on.
>
> Jason
>
> On 10/30/07, Vasco Andrade e Silva <vascoas@gmail.com> wrote:
> >
> > Hi,
> >
> > Where can i find a ruby (1.8.6) syntax specification? If that
> > specification means a file in the source, no problem for me.
> >
> > Thanks,
> > Vasco Andrade e Silva
> > --
> > Posted via http://www.ruby-....
> >
> >
>

Vasco Andrade e silva

10/31/2007 2:35:00 AM

0

Cédric Finance wrote:
> Then this is this file you wanted:
> http://svn.ruby-lang.org/repos/ruby/trun...

Thanks a lot.

(What a mess between the parser, keywords... :P)
--
Posted via http://www.ruby-....

Gene Tani

10/31/2007 6:44:00 AM

0

On Oct 30, 7:34 pm, Vasco Andrade e Silva <vasc...@gmail.com> wrote:
> C?dric Finance wrote:
> > Then this is this file you wanted:
> >http://svn.ruby-lang.org/repos/ruby/trun...
>
> Thanks a lot.
>
> (What a mess between the parser, keywords... :P)
> --
> Posted viahttp://www.ruby-....

there were also ANTLR grammars

http://redhanded.hobix.com/cult/parseYRe...