Re: Parsing generics painfully
Remi Forax <[email protected]> Thu, 2 Nov 2017 15:47:11 +0100 (CET)
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi Mark, there are several sections about the signature and the SignatureVisitor in the ASM guide [1] (starting at section 4.1) i do not know if it's enough ? Rémi [1] http://download.forge.objectweb.org/asm/asm4-guide.pdf ----- Mail original ----- > De: "Mark Raynsford" <[email protected]> > À: "asm" <[email protected]> > Envoyé: Jeudi 2 Novembre 2017 11:10:21 > Objet: Re: [asm] Parsing generics painfully > On 2017-11-01T18:29:35 +0000 > Mark Raynsford <[email protected]> wrote: > >> Hello. >> >> Does anyone have any example code regarding parsing generics into an >> AST-like structure? I'm having extreme difficulty correctly building >> ASTs from the event-based SignatureVisitor, and the lack of >> documentation is really not helpful at all. > > To elaborate: What I'm actually trying to do is compare two signatures > to try to determine if the generic type parameters of a given class > have changed. I consider two signatures to be equal if they're > α-equivalent: Take the first signature, substitute the names of all of > the bound variables with unique integers, saving the mappings of names > to integers. Perform the same renaming on the second signature using the > names → integers mapping produced from the first signature. Compare the > two renamed signatures for structural equality. > > -- > Mark Raynsford | http://www.io7m.com -- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws