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 > Windows based Parser
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Windows based Parser

Réponse
 
LinkBack Outils de la discussion
Vieux 07/06/2008, 22h40   #1
Muzaffar Hameed
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Windows based Parser

Hi All!

I need to parse a piece Ruby source code file. For that purpose, I need
a Ruby parser (which can be used on windows plateform). I tried to
configure ruby_parser 1.0, but I am unable to configure it on windows
XP, as it is depending upon RACC parser, which can be installed in unix
operating system. Any simple to use Ruby parse will be a great .

Thanks in advance to ALL.

Bye

/Muzaffar
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 08/06/2008, 02h10   #2
Daniel Brumbaugh Keeney
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Windows based Parser

On Sat, Jun 7, 2008 at 4:40 PM, Muzaffar Hameed <muzaffar@muzaffar.net> wrote:
> Hi All!
>
> I need to parse a piece Ruby source code file. For that purpose, I need
> a Ruby parser (which can be used on windows plateform). I tried to
> configure ruby_parser 1.0, but I am unable to configure it on windows
> XP, as it is depending upon RACC parser.


ParseTree comes precompiled for windows, is faster, and does the exact
same thing as ruby_parser.

Daniel Brumbaugh Keeney

  Réponse avec citation
Vieux 08/06/2008, 08h05   #3
Roger Pack
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Windows based Parser

Muzaffar Hameed wrote:
> Hi All!
>
> I need to parse a piece Ruby source code file. For that purpose, I need
> a Ruby parser (which can be used on windows plateform). I tried to
> configure ruby_parser 1.0, but I am unable to configure it on windows
> XP, as it is depending upon RACC parser, which can be installed in unix
> operating system. Any simple to use Ruby parse will be a great .
>
> Thanks in advance to ALL.
>
> Bye
>
> /Muzaffar


If you're truly adventurous you could try to download the win32 mingw
sandbox
http://rubyinstaller.rubyforge.org/wiki/wiki.pl?Mingw
and then install a mingw version of RACC.
Good luck with that.
-R
--
Posted via http://www.ruby-forum.com/.

  Réponse avec citation
Vieux 08/06/2008, 12h16   #4
Muzaffar Hameed
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Windows based Parser

Hi Daniel!

Thanks for ing me. I am able to install ParseTree on my windows
system. Further, it also requirs RubyInline, so I also installed it. But
I am still unable to run a simple example of parse tree so far.

I read in it documentations that

def conditional1(arg1)
if arg1 == 0 then
return 1
end
return 0
end

becomes:

[:defn,
:conditional1,
[:scope,
[:block,
[:args, :arg1],
[:if,
[:call, [:lvar, :arg1], :==, [:array, [:lit, 0]]],
[:return, [:lit, 1]],
nil],
[:return, [:lit, 0]]]]]

But how can I get this output. I am unable to do so. Actually I am
farely new to Ruby & specially parsing. Further, I have to run this
parser on Rails but no way yet. I am not able to run a simple example of
parsetree. I study much material about parsing but donot have a clue
that how to get the above output of the source file. I will be very
thankful,if you can guide me with a very simple example how to use
parsetree to get above output. I am waiting your kind reply.

Bye

/Muzaffar



Daniel Brumbaugh Keeney wrote:
> On Sat, Jun 7, 2008 at 4:40 PM, Muzaffar Hameed <muzaffar@muzaffar.net>
> wrote:
>> Hi All!
>>
>> I need to parse a piece Ruby source code file. For that purpose, I need
>> a Ruby parser (which can be used on windows plateform). I tried to
>> configure ruby_parser 1.0, but I am unable to configure it on windows
>> XP, as it is depending upon RACC parser.

>
> ParseTree comes precompiled for windows, is faster, and does the exact
> same thing as ruby_parser.
>
> Daniel Brumbaugh Keeney


--
Posted via http://www.ruby-forum.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 02h19.


É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
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10442 seconds with 12 queries