diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2007-09-02 19:15:32 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2007-09-02 19:15:32 (GMT) |
commit | 6bedd287437d2091820129533cb44f56609d0991 (patch) | |
tree | 05d18b9500cfc4e613b19d0154b89ed18542a3ae /src/scanner.l | |
parent | 115c6c02c3b246c525721aef9b1a43aeeb4666d5 (diff) | |
download | Doxygen-6bedd287437d2091820129533cb44f56609d0991.zip Doxygen-6bedd287437d2091820129533cb44f56609d0991.tar.gz Doxygen-6bedd287437d2091820129533cb44f56609d0991.tar.bz2 |
Release-1.5.3-20070902
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 51 |
1 files changed, 35 insertions, 16 deletions
diff --git a/src/scanner.l b/src/scanner.l index 4fd024a..3396579 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -890,7 +890,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) current->argList->clear(); lineCount() ; } -<FindMembers>{B}*"event"{BN}* { +<FindMembers>{B}*"event"{BN}+ { if (insideCli) { // C++/CLI event @@ -905,7 +905,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) REJECT; } } -<FindMembers>{B}*"property"{BN}* { +<FindMembers>{B}*"property"{BN}+ { if (insideCli) { // C++/CLI property @@ -942,7 +942,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) addType( current ); current->type += yytext; } -<FindMembers>{B}*"property"{BN}* { +<FindMembers>{B}*"property"{BN}+ { if (!current->type.isEmpty()) { REJECT; @@ -2751,15 +2751,18 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) <FindFields>";" { if (insideJava) // last enum field in Java class { - current->fileName = yyFileName; - current->startLine = yyLineNr; - current->type = "@"; // enum marker - current->args = current->args.simplifyWhiteSpace(); - current->name = current->name.stripWhiteSpace(); - current->section = Entry::VARIABLE_SEC; - current_root->addSubEntry(current); - current = new Entry ; - initEntry(); + if (!current->name.isEmpty()) + { + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->type = "@"; // enum marker + current->args = current->args.simplifyWhiteSpace(); + current->name = current->name.stripWhiteSpace(); + current->section = Entry::VARIABLE_SEC; + current_root->addSubEntry(current); + current = new Entry ; + initEntry(); + } // TODO: skip until the end of the scope BEGIN( SkipRemainder ); @@ -4001,7 +4004,7 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) delete current->sli; current->sli = 0; } - previous->endBodyLine=yyLineNr; + if (previous) previous->endBodyLine=yyLineNr; BEGIN( lastCurlyContext ) ; } } @@ -4209,6 +4212,15 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } BEGIN( FindMembers ); } +<CompoundName>{SCOPENAME}/"(" { + current->name = yytext ; + lineCount(); + if (current->spec & Entry::Protocol) + { + current->name += "-p"; + } + BEGIN( ClassVar ); + } <CompoundName>{SCOPENAME} { current->name = yytext ; lineCount(); @@ -4380,9 +4392,16 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?) } <ClassCategory>")" { current->name+=')'; - // category has no variables so push back an empty body - unput('}'); - unput('{'); + if ((current->section & Entry::Protocol) || + current->section == Entry::OBJCIMPL_SEC) + { + unput('{'); // fake start of body + } + else // category has no variables so push back an empty body + { + unput('}'); + unput('{'); + } BEGIN( ClassVar ); } <ClassVar>":" { |