summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-28 18:26:46 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2004-09-28 18:26:46 (GMT)
commitf08cd6363f5da22b2452d4f937fef68220fcb081 (patch)
tree01f67df4c4005875230919c5f826290b6a17a2e4 /src/scanner.l
parent8d674d5bacfc207f4b630262c01ba4bad38b0c82 (diff)
downloadDoxygen-f08cd6363f5da22b2452d4f937fef68220fcb081.zip
Doxygen-f08cd6363f5da22b2452d4f937fef68220fcb081.tar.gz
Doxygen-f08cd6363f5da22b2452d4f937fef68220fcb081.tar.bz2
Release-1.3.8-20040928
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l30
1 files changed, 25 insertions, 5 deletions
diff --git a/src/scanner.l b/src/scanner.l
index 09b6b88..3260974 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -197,6 +197,7 @@ static void initParser()
autoGroupStack.setAutoDelete(TRUE);
lastDefGroup.groupname.resize(0);
insideFormula = FALSE;
+ insideCode=FALSE;
}
static void initEntry()
@@ -843,6 +844,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
%%
<*>\x06[^\x06]*\x06 { // new file
+ if (YY_START==Comment)
+ {
+ warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ }
if (memberGroupId!=DOX_NOGROUP)
{
warn(yyFileName,yyLineNr,"Warning: Missing //@}");
@@ -1661,6 +1666,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
unput(';');
BEGIN(FindMembers);
}
+<FindMembers>"friend"{BN}+("class"|"union"|"struct"){BN}+ {
+ current->name=yytext;
+ BEGIN(FindMembers);
+ }
<FindMembers,FindMemberName>{SCOPENAME} {
lineCount();
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
@@ -2112,7 +2121,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
yyLineNr++;
}
<ReadInitializer>"@\"" {
- printf("insideCS=%d\n",insideCS);
+ //printf("insideCS=%d\n",insideCS);
current->initializer+=yytext;
if (!insideCS && !insideObjC)
{
@@ -2273,7 +2282,6 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->section = Entry::VARIABLE_SEC ;
current->fileName = yyFileName;
current->startLine = yyLineNr;
- //printf("New variable type=`%s' name=`%s' groupId=%d\n",current->type.data(),current->name.data(),current->mGrpId);
current_root->addSubEntry( current ) ;
}
if ( *yytext == ',')
@@ -2962,6 +2970,12 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<CopyArgCommentLine>. { fullArgString+=*yytext; }
<CopyArgComment>\n { fullArgString+=*yytext; yyLineNr++; }
<CopyArgComment>. { fullArgString+=*yytext; }
+<CopyArgComment>{CMD}("brief"|"short"){B}+ {
+ warn(yyFileName,yyLineNr,
+ "Warning: Ignoring %cbrief command inside argument documentation",*yytext
+ );
+ fullArgString+=' ';
+ }
<ReadTempArgs>"<" {
*copyArgString+=*yytext;
fullArgString+=*yytext;
@@ -3103,8 +3117,10 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
BEGIN(SkipCPP);
}
<FuncQual>"=" { // typically an initialized function pointer
- current->args += *yytext;
- BEGIN(FuncPtrInit);
+ //current->args += *yytext;
+ //BEGIN(FuncPtrInit);
+ lastInitializerContext=YY_START;
+ BEGIN(ReadInitializer);
}
<FuncPtrInit>[{;] {
unput(*yytext);
@@ -4265,7 +4281,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
current->startLine = yyLineNr;
BEGIN( ExampleDocArg1 );
}
-<Doc>{B}*{CMD}"details"{B}+ { /* nop */
+<ClassDoc,PageDoc,Doc,JavaDoc>{B}*{CMD}"details"{B}+ { /* nop */
}
<LineDoc>{CMD}"name"[^\n]*\n {
lastDefGroup.groupname.resize(0);
@@ -5988,6 +6004,10 @@ void parseMain(Entry *rt)
scanYYrestart( scanYYin );
BEGIN( FindMembers );
scanYYlex();
+ if (YY_START==Comment)
+ {
+ warn(yyFileName,yyLineNr,"File ended in the middle of a comment block! Perhaps a missing \\endcode?");
+ }
forceEndGroup();