diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-11-04 19:03:17 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2001-11-04 19:03:17 (GMT) |
commit | a29cfb7d102b893c56c1342fc738b788fc4885cf (patch) | |
tree | 8d5db673565aca95db666b5c91bda3e5d7f51efa /src/scanner.l | |
parent | 04e9bbe0f5ee5017392b171f21422f6dd924d52c (diff) | |
download | Doxygen-a29cfb7d102b893c56c1342fc738b788fc4885cf.zip Doxygen-a29cfb7d102b893c56c1342fc738b788fc4885cf.tar.gz Doxygen-a29cfb7d102b893c56c1342fc738b788fc4885cf.tar.bz2 |
Release-1.2.11-20011104
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l index 5873d2e..fc6a7eb 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -581,6 +581,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) %x NSAliasName %x NSAliasArg %x PackageName +%x GetCallType %% @@ -1628,9 +1629,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <FindFieldArg>"," { unput(*yytext); BEGIN(FindFields); } */ <ReadBody>[^\r\n{}"'/]* { current->program += yytext ; } -<ReadBody>"//".* { current->program += yytext ; } -<ReadBody>\"[^\r\n"]*\" { current->program += yytext ; } -<ReadBody>"/*"{B}* { current->program += yytext ; +<ReadBody>"//".* { current->program += yytext ; } +<ReadBody>\" { current->program += yytext ; + pCopyQuotedString = ¤t->program; + lastStringContext=YY_START; + BEGIN( CopyString ); + } +<ReadBody>"/*"{B}* { current->program += yytext ; lastContext = ReadBody ; BEGIN( Comment ) ; } @@ -1919,6 +1924,32 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <FuncFuncType>. { current->type += *yytext; } +<FindMembers>"("/{BN}*{ID}{BN}*"*" { // for catching typedef void (__stdcall *f)() like definitions + if (current->type.left(7)=="typedef" && current->bodyLine==-1) + // the bodyLine check is to prevent this guard to be true more than once + { + current->bodyLine = yyLineNr; + BEGIN( GetCallType ); + } + else if (!current->name.isEmpty()) // normal function + { + current->args = yytext; + current->bodyLine = yyLineNr; + currentArgumentContext = FuncQual; + fullArgString=current->args.copy(); + copyArgString=¤t->args; + BEGIN( ReadFuncArgType ) ; + //printf(">>> Read function arguments!\n"); + } + } +<GetCallType>{BN}*{ID}{BN}*"*" { + lineCount(); + addType(current); + funcPtrType="("; + funcPtrType+=yytext; + roundCount=0; + BEGIN( FuncPtr ); + } <FindMembers>"(" { if (!current->name.isEmpty()) { @@ -3905,7 +3936,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) <Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>"\\"[a-z_A-Z][a-z_A-Z0-9]*[\\] { // directory type of text current->doc+=yytext; } -<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc,SkipSection>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { +<Doc,ClassDoc,PageDoc,ExampleDoc,AfterDoc>{CMD}[a-z_A-Z][a-z_A-Z0-9]* { QCString *pValue=Doxygen::aliasDict[yytext+1]; if (pValue) { |