PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Rex & Racc : howto?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Rex & Racc : howto?

Réponse
 
LinkBack Outils de la discussion
Vieux 21/06/2008, 07h27   #1
fdelente@mail.cpod.fr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Rex & Racc : howto?

Hello.

I'm looking for documentation on rex & racc, as what I have found up to now
(mainly the homepages and the READMEs) are rather terse.

Any pointers or examples of use?

Thanks.

--
Fabrice DELENTE
  Réponse avec citation
Vieux 21/06/2008, 17h59   #2
nicholasmabry@gmail.com
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rex & Racc : howto?

> I'm looking for documentation on rex & racc, as what I have found up to now
> (mainly the homepages and the READMEs) are rather terse.


I haven't run across any rex and racc tutorials online, but there are
is a solid example parser buried inside the rex tarball distribution.
The 'calc3' example consists of two source files:
calc3.rex -> The rex token definitions
calc3.racc -> The racc grammar definitions and executable script

They demonstrate many of the differences in coming from lex and yacc.

If you aren't familiar with the traditionally C-based lex and yacc,
they have been in wide use for a (relatively) long time and are well
documented online. I would suggest starting with their documentation
if you are just getting started with parsers, or even LALR parsers. A
good introduction can be found here:
http://epaperpress.com/lexandyacc/

If you aren't set on using an LALR parser, then the Treetop library is
an interesting alternative. It uses a very different method of
generation, but it's become a popular Ruby tool. It can be found here:
http://treetop.rubyforge.org/

Let us know if this doesn't answer your question. Good luck!

-Nick
  Réponse avec citation
Vieux 21/06/2008, 18h44   #3
Ryan Davis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rex & Racc : howto?


On Jun 21, 2008, at 09:58 , nicholasmabry@gmail.com wrote:

>> I'm looking for documentation on rex & racc, as what I have found
>> up to now
>> (mainly the homepages and the READMEs) are rather terse.

>
> I haven't run across any rex and racc tutorials online, but there are
> is a solid example parser buried inside the rex tarball distribution.
> The 'calc3' example consists of two source files:
> calc3.rex -> The rex token definitions
> calc3.racc -> The racc grammar definitions and executable script
>
> They demonstrate many of the differences in coming from lex and yacc.
>
> If you aren't familiar with the traditionally C-based lex and yacc,
> they have been in wide use for a (relatively) long time and are well
> documented online. I would suggest starting with their documentation
> if you are just getting started with parsers, or even LALR parsers. A
> good introduction can be found here:
> http://epaperpress.com/lexandyacc/
>
> If you aren't set on using an LALR parser, then the Treetop library is
> an interesting alternative. It uses a very different method of
> generation, but it's become a popular Ruby tool. It can be found here:
> http://treetop.rubyforge.org/
>
> Let us know if this doesn't answer your question. Good luck!


This is all good advice. For a more complicated racc example (doesn't
use rex), look at ruby_parser. It is big and gross, so it better
simulates what all yacc-based grammar definitions eventually become.


  Réponse avec citation
Vieux 21/06/2008, 19h37   #4
fdelente@mail.cpod.fr
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rex & Racc : howto?

Thanks for the answers.

I've read (a good part of) the lex&yacc book, and read online documentation.
I don't know about Treetop, but will look into it.

--
Fabrice DELENTE
  Réponse avec citation
Vieux 25/06/2008, 08h24   #5
Clifford Heath
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Rex & Racc : howto?

fdelente@mail.cpod.fr wrote:
> I've read (a good part of) the lex&yacc book, and read online documentation.
> I don't know about Treetop, but will look into it.


upside: It can parse non-context free grammars, which the others find hard or impossible.
upside: They're as efficient as context-free ones.
downside: That's not very efficiently... it's quite slow.
downside: You have to have all your input in one string to use it - no IOStreams.

It is very sweet and clean and all kinds of good things, and since you're
using Ruby already you might not be too worried about performance :-).

Clifford Heath.
  Réponse avec citation
Vieux 25/06/2008, 12h03   #6
Robert Klemme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how do i unsubscribe?

Please look at the headers of a ruby-talk email.

robert

2008/6/25 Fred Chingota <fredchingota@yahoo.com>:
> Dear all
> i would like to remove myself from this ruby-talk, how do i go about?
>
>
>




--
use.inject do |as, often| as.you_can - without end

  Réponse avec citation
Vieux 25/06/2008, 13h38   #7
J-H Johansen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how do i unsubscribe?

And if you don't have a clue of what a "header" is:

X-ML-Name: ruby-talk
X-Mail-Count: 306167
X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only
members can post)
X-ML-Info: If you have a question, send e-mail with the body
"" (without quotes) to the address ruby-talk-ctl@ruby-lang.org;
=<mailto:ruby-talk-ctl@ruby-lang.org?body=>
X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on

On Wed, Jun 25, 2008 at 1:03 PM, Robert Klemme
<shortcutter@googlemail.com> wrote:
> Please look at the headers of a ruby-talk email.
>
> robert
>
> 2008/6/25 Fred Chingota <fredchingota@yahoo.com>:
>> Dear all
>> i would like to remove myself from this ruby-talk, how do i go about?
>>
>>
>>

>
>
>
> --
> use.inject do |as, often| as.you_can - without end
>
>




--
J-H Johansen
--
There are 10 kinds of people in the world: Those who understand binary and
those who don't...

  Réponse avec citation
Vieux 25/06/2008, 14h20   #8
Robert Klemme
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how do i unsubscribe?

2008/6/25 J-H Johansen <ondemannen@gmail.com>:
> And if you don't have a clue of what a "header" is:
>
> X-ML-Name: ruby-talk
> X-Mail-Count: 306167
> X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only
> members can post)
> X-ML-Info: If you have a question, send e-mail with the body
> "" (without quotes) to the address ruby-talk-ctl@ruby-lang.org;
> =<mailto:ruby-talk-ctl@ruby-lang.org?body=>
> X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on


You omitted the interesting bit:

List-Id: ruby-talk.ruby-lang.org
List-Software: fml [fml 4.0.3 release (20011202/4.0.3)]
List-Post: <mailto:ruby-talk@ruby-lang.org>
List-Owner: <mailto:ruby-talk-admin@ruby-lang.org>
List-: <mailto:ruby-talk-ctl@ruby-lang.org?body=>
List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?body=unsubscribe>

Cheers

robert

--
use.inject do |as, often| as.you_can - without end

  Réponse avec citation
Vieux 25/06/2008, 14h27   #9
J-H Johansen
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how do i unsubscribe?

grrr ... I'll have to learn to use page-down key.

cheers =)

On Wed, Jun 25, 2008 at 3:20 PM, Robert Klemme
<shortcutter@googlemail.com> wrote:
> 2008/6/25 J-H Johansen <ondemannen@gmail.com>:
>> And if you don't have a clue of what a "header" is:
>>
>> X-ML-Name: ruby-talk
>> X-Mail-Count: 306167
>> X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only
>> members can post)
>> X-ML-Info: If you have a question, send e-mail with the body
>> "" (without quotes) to the address ruby-talk-ctl@ruby-lang.org;
>> =<mailto:ruby-talk-ctl@ruby-lang.org?body=>
>> X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on

>
> You omitted the interesting bit:
>
> List-Id: ruby-talk.ruby-lang.org
> List-Software: fml [fml 4.0.3 release (20011202/4.0.3)]
> List-Post: <mailto:ruby-talk@ruby-lang.org>
> List-Owner: <mailto:ruby-talk-admin@ruby-lang.org>
> List-: <mailto:ruby-talk-ctl@ruby-lang.org?body=>
> List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?body=unsubscribe>
>
> Cheers
>
> robert
>
> --
> use.inject do |as, often| as.you_can - without end
>
>




--
J-H Johansen
--
There are 10 kinds of people in the world: Those who understand binary and
those who don't...

  Réponse avec citation
Vieux 25/06/2008, 16h07   #10
Rick DeNatale
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: how do i unsubscribe?

[Note: parts of this message were removed to make it a legal post.]

On Wed, Jun 25, 2008 at 9:20 AM, Robert Klemme <shortcutter@googlemail.com>
wrote:

> 2008/6/25 J-H Johansen <ondemannen@gmail.com>:
> > And if you don't have a clue of what a "header" is:
> >
> > X-ML-Name: ruby-talk
> > X-Mail-Count: 306167
> > X-MLServer: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only
> > members can post)
> > X-ML-Info: If you have a question, send e-mail with the body
> > "" (without quotes) to the address

> ruby-talk-ctl@ruby-lang.org;
> > =<mailto:ruby-talk-ctl@ruby-lang.org?body=>
> > X-Spam-Checker-Version: SpamAssassin 3.1.7-deb (2006-10-05) on

>
> You omitted the interesting bit:
>
> List-Id: ruby-talk.ruby-lang.org
> List-Software: fml [fml 4.0.3 release (20011202/4.0.3)]
> List-Post: <mailto:ruby-talk@ruby-lang.org>
> List-Owner: <mailto:ruby-talk-admin@ruby-lang.org>
> List-: <mailto:ruby-talk-ctl@ruby-lang.org?body=>
> List-Unsubscribe: <mailto:ruby-talk-ctl@ruby-lang.org?body=unsubscribe>
>


On the other hand, I'd venture to guess that a large proportion of people
who need to resort to sending a post to a list to ask how to unsubscribe
don't know how to view the headers.

Many popular mail-clients bury headers under one or more levels of
user-friendliness. For example gmail, has a show details link, which
DOESN'T show the headers. You have to click on a pull-down list next to the
reply link and select " Show original"

So, for the OP if you still haven't managed to unsubscribe, the way to do it
is to send an email from the email address which is receiving the postings
to ruby-talk-ctl@ruby-lang.org with just the text unsubscribe as the body of
the email.


--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 03h52.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,23165 seconds with 18 queries