[squeak-dev] Smacc and CPD

Davide Falzoni davide.falzoni at yahoo.com
Wed Mar 5 07:11:00 UTC 2008


Hi Matthias

--- Matthias Berth <matthias.berth at googlemail.com>
wrote:

> Davide, Lukas,
> 
> I'm just guessing here - Davide wants to compare the
> parse trees of,
> say, two methods, as opposed to the source code.
> That's what the CPD
> (copy/paste detector) is proud of, they can identify
> copied Java code
> even if it was reformatted.


Right, that's my purpose


> In Smalltalk, you can access or create the parse
> tree of a method (I
> don't know how, sorry). 

So do I :-)

> So there is no need to write
> your own parser.

Ok

> Another route would be to normalize the code before
> comparison, check
> out the implementors / senders of prettyPrint:. Then
> you would compare
> lines of normalized code.


FYI, on the visualworks list, people suggest me to
look at smalldude
(http://moose.unibe.ch/tools/smalldude)

Thanks
 Davide

> HTH
> 
> Matthias
> 
> 
> 
> 
> 
> On Mon, Mar 3, 2008 at 11:05 PM, Lukas Renggli
> <renggli at gmail.com> wrote:
> > > No hints?
> >  > Davide
> >
> >  The NewCompiler on squeaksource.com uses SmaCC
> for example. SmaCC
> >  itself comes with many examples. It also includes
> a small tutorial.
> >
> >  What I find a bit strange how you ask your
> question: "I have problem
> >  X. How do I use SmaCC to solve it?" In my opinion
> you should first try
> >  to formulate the steps to get to a solution and
> only afterwards look
> >  for tools that could help you reaching this goal?
> I don't understand
> >  what you want to do ...
> >
> >  Lukas
> >
> >  --
> >  Lukas Renggli
> >  http://www.lukas-renggli.ch
> >
> >
> 
> 



      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 





More information about the Squeak-dev mailing list