summaryrefslogtreecommitdiffstats
path: root/src/scanner.l
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-08-26 17:33:07 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2002-08-26 17:33:07 (GMT)
commit55d2ef8412008e1560b0d5a2ecc2031f269af4a1 (patch)
tree6d5ee0db5c717ebabc57f2d2a15a1365d5e3fa19 /src/scanner.l
parent17e35fd285d98df3c7fe59ee8805152726c3572e (diff)
downloadDoxygen-55d2ef8412008e1560b0d5a2ecc2031f269af4a1.zip
Doxygen-55d2ef8412008e1560b0d5a2ecc2031f269af4a1.tar.gz
Doxygen-55d2ef8412008e1560b0d5a2ecc2031f269af4a1.tar.bz2
Release-1.2.17-20020826
Diffstat (limited to 'src/scanner.l')
-rw-r--r--src/scanner.l106
1 files changed, 73 insertions, 33 deletions
diff --git a/src/scanner.l b/src/scanner.l
index ca13399..17dd7be 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -383,7 +383,7 @@ static QCString extractName(const QCString &s)
static void setContext()
{
QCString fileName = yyFileName;
- insideIDL = fileName.right(4)==".idl";
+ insideIDL = fileName.right(4)==".idl" || fileName.right(4)==".odl";
insideJava = fileName.right(5)==".java";
insidePHP = fileName.right(4)==".php" || fileName.right(4)==".inc";
if ( insidePHP )
@@ -461,9 +461,12 @@ static void addSpecialItem(const char *listName)
QCString cmdString;
cmdString.sprintf("\\%s %d\n",listName,itemId);
current->doc += cmdString;
+ QCString tmpName = current->name;
+ current->name = listName;
sectionType=SectionInfo::Anchor;
sectionLabel=anchorLabel;
addSection();
+ current->name = tmpName;
}
current->brief = slString.copy(); // restore orginial brief desc.
}
@@ -900,35 +903,59 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( CompoundName );
}
<FindMembers>{B}*"module"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "module" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
lineCount();
- BEGIN( CompoundName );
+ if (insideIDL)
+ {
+ isTypedef=FALSE;
+ current->section = Entry::NAMESPACE_SEC;
+ current->type = "module" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ BEGIN( CompoundName );
+ }
+ else
+ {
+ addType( current ) ;
+ current->name = QCString(yytext).stripWhiteSpace();
+ }
}
<FindMembers>{B}*"library"{BN}+ {
- isTypedef=FALSE;
- current->section = Entry::NAMESPACE_SEC;
- current->type = "library" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
lineCount();
- BEGIN( CompoundName );
+ if (insideIDL)
+ {
+ isTypedef=FALSE;
+ current->section = Entry::NAMESPACE_SEC;
+ current->type = "library" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ BEGIN( CompoundName );
+ }
+ else
+ {
+ addType( current ) ;
+ current->name = QCString(yytext).stripWhiteSpace();
+ }
}
<FindMembers>{B}*((("disp")?"interface")|"valuetype"){BN}+ { // M$/Corba IDL interface
- isTypedef=FALSE;
- current->section = Entry::INTERFACE_SEC;
- addType( current ) ;
- current->type += " interface" ;
- current->fileName = yyFileName;
- current->startLine = yyLineNr;
- current->bodyLine = yyLineNr;
lineCount();
- BEGIN( CompoundName );
+ if (insideIDL)
+ {
+ isTypedef=FALSE;
+ current->section = Entry::INTERFACE_SEC;
+ addType( current ) ;
+ current->type += " interface" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ BEGIN( CompoundName );
+ }
+ else
+ {
+ addType( current ) ;
+ current->name = QCString(yytext).stripWhiteSpace();
+ }
}
<FindMembers>{B}*"exception"{BN}+ { // Corba IDL exception
isTypedef=FALSE;
@@ -950,19 +977,31 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->fileName = yyFileName;
current->startLine = yyLineNr;
current->bodyLine = yyLineNr;
- //if (current->mtArgList) // transfer template arguments
- //{
- // if (current->tArgList)
- // {
- // delete current->tArgList;
- // }
- // current->tArgList = current->mtArgList;
- // current->mtArgList = 0;
- //}
lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ;
}
+<FindMembers>{B}*"coclass"{BN}+ {
+ if (insideIDL)
+ {
+ isTypedef=FALSE;
+ current->section = Entry::CLASS_SEC;
+ addType( current ) ;
+ current->type += " coclass" ;
+ current->fileName = yyFileName;
+ current->startLine = yyLineNr;
+ current->bodyLine = yyLineNr;
+ lineCount() ;
+ BEGIN( CompoundName ) ;
+ }
+ else
+ {
+ addType(current);
+ current->name = yytext;
+ current->name = current->name.stripWhiteSpace();
+ lineCount();
+ }
+ }
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"struct{" |
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"struct"/{BN}+ {
isTypedef=((QCString)yytext).find("typedef")!=-1;
@@ -4482,7 +4521,8 @@ static void parseCompounds(Entry *rt)
{
if (ce->fileName.right(5)==".java" ||
ce->fileName.right(4)==".php" ||
- ce->fileName.right(4)==".inc")
+ ce->fileName.right(4)==".inc"
+ )
current->protection = protection = Public ; // Actually this should be package scope!
else
current->protection = protection = Private ;