diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-06-17 19:53:53 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2004-06-17 19:53:53 (GMT) |
commit | d3c3bbd02543280d12a763d82aa5b54ce516c57f (patch) | |
tree | e215fcacfb74cc58f4d27e30b9722efd930d7a7a /src/scanner.l | |
parent | f309c3c0e7c1cf29df6b850e19d647e93a30ce28 (diff) | |
download | Doxygen-d3c3bbd02543280d12a763d82aa5b54ce516c57f.zip Doxygen-d3c3bbd02543280d12a763d82aa5b54ce516c57f.tar.gz Doxygen-d3c3bbd02543280d12a763d82aa5b54ce516c57f.tar.bz2 |
Release-1.3.7-20040617
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 51 |
1 files changed, 47 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l index 43b355a..08c116c 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -1485,21 +1485,31 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] BEGIN(Using); } <Using>"namespace"{BN}+ { lineCount(); BEGIN(UsingDirective); } -<Using>{ID}{BN}*"::"{BN}*{ID}({BN}*"::"{BN}*{ID})* { +<Using>{ID}{BN}*({BN}*("::"|"."){BN}*{ID})* { lineCount(); current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDECL_SEC; - //printf("Found using declaration %s\n",yytext); current_root->addSubEntry(current); current = new Entry ; + if (insideCS) /* Hack: in C# a using declaration and + directive have the same syntax, so we + also add it as a using directive here + */ + { + current->name=yytext; + current->fileName = yyFileName; + current->startLine = yyLineNr; + current->section=Entry::USINGDIR_SEC; + current_root->addSubEntry(current); + current = new Entry ; + } initEntry(); BEGIN(Using); } <UsingDirective>{SCOPENAME} { current->name=yytext; current->fileName = yyFileName; current->section=Entry::USINGDIR_SEC; - //printf("Found using directive %s\n",yytext); current_root->addSubEntry(current); current = new Entry ; initEntry(); @@ -3616,6 +3626,39 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] } BEGIN( FindMembers ); } +<Bases,ClassVar>"///"/[^/] { + if (!insideObjC) + { + REJECT; + } + else + { + lineCount(); + current->program+=yytext; + current->fileName = yyFileName ; + current->startLine = yyLineNr ; + curlyCount=0; + BEGIN( ReadBodyIntf ); + } + } +<Bases,ClassVar>("//"{B}*)?"/**"/[^/*] | +<Bases,ClassVar>("//"{B}*)?"/*!" | +<Bases,ClassVar>"//!" | +<Bases,ClassVar>[\-+]{BN}+ { + if (!insideObjC) + { + REJECT; + } + else + { + lineCount(); + current->program+=yytext; + current->fileName = yyFileName ; + current->startLine = yyLineNr ; + curlyCount=0; + BEGIN( ReadBodyIntf ); + } + } <CompoundName,ClassVar>{B}*"{"{B}* { current->fileName = yyFileName ; current->startLine = yyLineNr ; @@ -3666,7 +3709,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;] else { yyLineNr++; - unput('{'); + //unput('{'); } } <ClassVar,Bases>"@end" { // empty ObjC interface |