[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Does any Ruby parser exist ?

Lothar Scholz

5/10/2005 6:24:00 PM

Hello ruby-talk,

Does any Ruby parser existother then the internal one inside the ruby
interpreter. I found a few projects but most of them seems to be dead.

bRuby (not really a parser) and Ripper are old and not touched since
2003. I need some positional data for the AST and a defined way to
traverse the AST. Even the ParseTree project forgets to traverse some
branches inside the tree.



--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




7 Answers

Florian Groß

5/10/2005 7:53:00 PM

0

Lothar Scholz

5/10/2005 8:17:00 PM

0

Hello Florian,

>> Does any Ruby parser existother then the internal one inside the ruby
>> interpreter. I found a few projects but most of them seems to be dead.
>>
>> bRuby (not really a parser) and Ripper are old and not touched since
>> 2003.

FG> Ripper has been merged into 1.9 and is part of the windows one-click
FG> installer -- its grammar rules will thus always be up-to-date in the future.

How compatible are these rules with 1.8 ?

FG> I think that Ripper will do what you want, but I think you will have to
FG> build the tree by yourself.

Okay i will see if i can use Ripper, as i must add it to a running
1.8.2 ruby system.

FG> That aside there is also a few lexers like the IRB one and the one used
FG> by the syntax library that does Ruby code highlighting.

They are all ugly hacks that are just doing a fraction of the ruby
grammer. Good for there special purpose but i need something
different. And none of them can give me line/column positions of an
indentifier.


--
Best regards, emailto: scholz at scriptolutions dot com
Lothar Scholz http://www.ru...
CTO Scriptolutions Ruby, PHP, Python IDE 's




Florian Groß

5/10/2005 8:57:00 PM

0

Ryan Davis

5/20/2005 7:52:00 PM

0


On May 10, 2005, at 11:23 AM, Lothar Scholz wrote:

> Even the ParseTree project forgets to traverse some branches inside
> the tree.

Really? Where?

Please respond directly, or better, file a bug at http://
rubyforge.org/projects/parsetree/

--
ryand-ruby@zenspider.com - Seattle.rb - http://www.zens...
seattle.rb
http://blog.zens... - http://rubyforge.org/proje...




Bob Phillips

6/18/2008 9:46:00 AM

0

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
Cancel As Boolean)
' Make sure cell within the specified range was select
If Not Intersect(Target, Range("C2:E5")) Is Nothing Then
' Make sure the double click does not enter Edit Mode
Cancel = True
' Alternate between "X" and ""
If Target.Value = "X" Then
Target.Value = ""
Target.Interior.ColorIndex = xlColorindexNone
Else
Target.Value = "X"
Target.Interior.ColorIndex = 3 ' red
End If
End If
End Sub

--
__________________________________
HTH

Bob

"DoctorC" <ecolautti@poczta.onet.pl> wrote in message
news:4858d797$0$15082$f69f905@mamut2.aster.pl...
> Rick Rothstein (MVP - VB) pisze:
>> There is no "click event" for a worksheet. Sometime SelectionChange can
>> be used as a substitute, but for the functionality you want, I don't
>> think it is a good choice (it won't allow you to correct a mistake
>> without clicking a different cell and then clicking back into the
>> erroneous one). Would a double-click to mark the cell be acceptable? If
>> so, do the following... Right-click the tab for the worksheet you want
>> this functionality on. This will take you to the code window for the
>> worksheet you right-clicked on within the Visual Basic editor. Copy/Paste
>> this event procedure into that code window...
>>
>> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
>> Cancel As Boolean)
>> ' Make sure cell within the specified range was select
>> If Not Intersect(Target, Range("C2:E5")) Is Nothing Then
>> ' Make sure the double click does not enter Edit Mode
>> Cancel = True
>> ' Alternate between "X" and ""
>> If Target.Value = "X" Then
>> Target.Value = ""
>> Else
>> Target.Value = "X"
>> End If
>> End If
>> End Sub
>>
>> In the first If-Then statement, I specified an example range of
>> Range("C2:E5")... change that to the range of cells you want the be able
>> to mark by double-clicking. That is it. Go back to the worksheet and
>> double-click a blank cell (actually a cell not containing an "X"... if it
>> has text in it other than an "X", it shouldn't though, it will be treated
>> as if it were blank) within the specified range to place an "X" in it.
>> Double-click a cell with an "X" in it to blank it out.
>>
>> Rick
>
> Great!!
> Thanks a lot
>
> Could you make so that the cell color changes also?
>
> Enrico


DoctorC

6/18/2008 9:52:00 AM

0

DoctorC pisze:
>
> Great!!
> Thanks a lot
>
> Could you make so that the cell color changes also?
>
> Enrico


I managed alone

Thanks for your help

Enrico

DoctorC

6/18/2008 9:53:00 AM

0

Bob Phillips pisze:
> Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
> Cancel As Boolean)
> ' Make sure cell within the specified range was select
> If Not Intersect(Target, Range("C2:E5")) Is Nothing Then
> ' Make sure the double click does not enter Edit Mode
> Cancel = True
> ' Alternate between "X" and ""
> If Target.Value = "X" Then
> Target.Value = ""
> Target.Interior.ColorIndex = xlColorindexNone
> Else
> Target.Value = "X"
> Target.Interior.ColorIndex = 3 ' red
> End If
> End If
> End Sub
>


I used Target.Interior.Color = vbRed

Thanks anyway for your help

Enrico