[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Fwd: [aspectj-dev] Fwd: metacomments and aspectj - need suggestion

Hi Sergev/Andrew and others.

I think what you are trying to do would be possible with abc (the
AspectBench Compiler), however, it may be overkill. A simple parser
should do, actually. Both ajc and abc are designed to implement
joinpoints that are dynamic, i.e. execute at runtime of the program.
What Sergev is trying to do is matching purely static entities
(comments) and actually printing them *at compile time*. This does not
have much to do with AOP. I would suggest to use a simple SableCC or
JavaCC parser. You could use a simple visitor to print the comments.

Another alternative could even be to use awk, grep and/or sed.

Eric

--
Eric Bodden
Software Technology Group, Technische UniversitÃt Darmstadt, Germany
Tel: +49 6151 16-5478 Â ÂFax: +49 6151 16-5410
Mailing Address: S2|02 A209, HochschulstraÃe 10, 64289 Darmstadt



2009/10/22 Andrew Eisenberg <andrew@xxxxxxxxxxxx>:
> Hi there,
>
> The ajc compiler was not designed to be extensible by end users. ÂIts
> focus has is efficiency and stability. ÂHowever, the AspectBench
> compiler is designed for extensibility and for testing out new ideas.
> This might be more suitable to your purposes.
>
> http://abc.comlab.ox.ac.uk/introduction
>
> 2009/10/22 Sergey Staroletov <sergey.staroletov@xxxxxxxxx>:
>> Hello. I'm doing my first step research in AspectJ because I am thinking
>> that one feature in itÂwill help me in my big research project. I want to
>> tryÂto extend aspectj language to process my specialÂÂcomments (non-java
>> doc,Âjust single-line or multi-line user comments)Âin java files with
>> aspectj weaving. In my idea It will be as:
>>
>> in aj file (added new word 'comment')
>>
>> pointcut point(String s) :Âcomment(s);
>>
>> long before(String s) : point(s) {
>>
>> System.out.println(s) ;
>>
>> }
>>
>>
>>
>> in java file
>>
>> System.out.println("start") ;
>>
>> //comment here
>>
>> System.out.println("stop") ;
>>
>>
>>
>> and sample result
>>
>>
>>
>> start
>>
>> comment here
>>
>> stop
>>
>> I am thinking that instruction to process commentÂwill be inserting between
>> code line before comment and code line after comment
>>
>> It is possible to realize by myself and where can i find the develper
>> documentation? (And whatÂshall I do to patch existing code (I've downloaded
>> AJT sourceÂto my Eclipse, built and tried to debug this - but I'm lost my
>> way)Â?
>>
>>
>> --
>> Ð ÑÐÐÐÐÐÐÐÐ, ÐÑÐÑÐÐÐÑÐÐ ÐÐÑÐÐÐ
>>
>> _______________________________________________
>> aspectj-dev mailing list
>> aspectj-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>>
>>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>