Ruby Lex Specification

Discussion in 'Ruby' started by Vasco Andrade e Silva, Oct 30, 2007.

  1. 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-forum.com/.
     
    Vasco Andrade e Silva, Oct 30, 2007
    #1
    1. Advertising

  2. 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-forum.com/.
     
    Vasco Andrade e Silva, Oct 30, 2007
    #2
    1. Advertising

  3. 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 <>:
    > 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
    >
    > On 10/30/07, Vasco Andrade e Silva <> 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-forum.com/.
    > >
    > >

    >
     
    Gaspard Bucher, Oct 30, 2007
    #3
  4. Vasco Andrade e Silva, Oct 31, 2007
    #4
  5. Vasco Andrade e Silva

    Gene Tani Guest

    Gene Tani, Oct 31, 2007
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ronald Pijnacker

    Specification of Ruby regex?

    Ronald Pijnacker, Aug 25, 2003, in forum: Ruby
    Replies:
    8
    Views:
    136
    Hal Fulton
    Aug 27, 2003
  2. David Ross

    Ruby Specification

    David Ross, Jul 19, 2004, in forum: Ruby
    Replies:
    26
    Views:
    387
    Lothar Scholz
    Jul 21, 2004
  3. Tom Payne

    Ruby equivalent of Lex (or Flex)?

    Tom Payne, Jan 5, 2006, in forum: Ruby
    Replies:
    2
    Views:
    152
    Doug H
    Jan 5, 2006
  4. Andy Delcambre

    ruby-lex

    Andy Delcambre, Mar 29, 2006, in forum: Ruby
    Replies:
    1
    Views:
    243
    Jan Friedrich
    Mar 30, 2006
  5. Shugo Maeda

    [ANN] Ruby draft specification

    Shugo Maeda, Dec 1, 2009, in forum: Ruby
    Replies:
    5
    Views:
    196
    Ryan Davis
    Dec 2, 2009
Loading...

Share This Page