This page is no longer maintained — Please continue to the home page at www.scala-lang.org

typical...

2 replies
Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Scalads and lasses,
i'm attempting to use http://code.google.com/p/javaparser from within Scala. There's just one teensy little problem. The parser has a package called type and a bunch of code using the 'type' as an identifier. Scala is none too happy about this. Is there a quick and dirty way around this -- short of renaming/refactoring a major section of this 3rd party code?
Best wishes,
--greg

--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com
Bill Venners
Joined: 2008-12-18,
User offline. Last seen 31 weeks 5 days ago.
Re: typical...

Hi Greg,

Putting `type` in backticks should do the trick, which makes it a
"literal identifier." And if you don't want to type that over and over
you could put a thin API in front that takes care of the backticks,
and you call the Scala-friendly stuff in front.

Bill

On Thu, Feb 26, 2009 at 7:02 PM, Meredith Gregory
wrote:
> Scalads and lasses,
> i'm attempting to use http://code.google.com/p/javaparser from within Scala.
> There's just one teensy little problem. The parser has a package called type
> and a bunch of code using the 'type' as an identifier. Scala is none too
> happy about this. Is there a quick and dirty way around this -- short of
> renaming/refactoring a major section of this 3rd party code?
> Best wishes,
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: typical...
Bill,
Cheers! That did the trick. It's surprisingly easy to do source-to-source transformation on Java -- even as verbose as it is.
Best wishes,
--greg

On Thu, Feb 26, 2009 at 7:07 PM, Bill Venners <bill@artima.com> wrote:
Hi Greg,

Putting `type` in backticks should do the trick, which makes it a
"literal identifier." And if you don't want to type that over and over
you could put a thin API in front that takes care of the backticks,
and you call the Scala-friendly stuff in front.

Bill

On Thu, Feb 26, 2009 at 7:02 PM, Meredith Gregory
<lgreg.meredith@gmail.com> wrote:
> Scalads and lasses,
> i'm attempting to use http://code.google.com/p/javaparser from within Scala.
> There's just one teensy little problem. The parser has a package called type
> and a bunch of code using the 'type' as an identifier. Scala is none too
> happy about this. Is there a quick and dirty way around this -- short of
> renaming/refactoring a major section of this 3rd party code?
> Best wishes,
> --greg
>
> --
> L.G. Meredith
> Managing Partner
> Biosimilarity LLC
> 806 55th St NE
> Seattle, WA 98105
>
> +1 206.650.3740
>
> http://biosimilarity.blogspot.com
>



--
L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

http://biosimilarity.blogspot.com

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland