Ruby Lex Specification

  • Thread starter Vasco Andrade e Silva
  • Start date
V

Vasco Andrade e Silva

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
 
V

Vasco Andrade e Silva

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
 
G

Gaspard Bucher

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 said:
parse.y is your source. (http://svn.ruby-lang.org/repos/ruby/trunk/parse.y)

There is no official Ruby spec (yet), but it is slowly being worked on.

Jason
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Nested Mixin Problem(?) 7
Shadowing bug?? 10
ruby-lex 1
[ANN] Ruby draft specification 5
self in blocks 17
Ruby Specification 26
problems with indirect width specification 5
Ruby based AS2 library or gem 1

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top