[cfe-dev] HELP FOR CLANG

Eli Friedman eli.friedman at gmail.com
Tue Jul 16 01:14:40 PDT 2013


On Mon, Jul 15, 2013 at 8:42 PM, Arpit Sancheti
<arpit.sancheti at iiitdmj.ac.in> wrote:
> Respected Sir,
> Actually by mistake I have written ACSL as ASCL its a ANSI C Specific
> Language.More detail about it u can found at
> http://frama-c.com/acsl_tutorial_index.html. And I want to add some new
> keywords, new tokens and then parse them also.

(Adding the mailing list back to the discussion.)

You actually asking for the wrong thing.  Given how ACSL works, you
don't want to modify the lexer at all.  You can get the comment
associated with a declaration in the AST by calling
ASTContext::getRawCommentForDecl.  (clang_Cursor_getRawCommentText in
the C API.)

-Eli



More information about the cfe-dev mailing list