diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2006-02-04 15:33:47 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2006-02-04 15:33:47 (GMT) |
commit | a9a600c4692a1d0b0a6a09362db1d6da8bda9a30 (patch) | |
tree | 2d45018d20008480ccea03a78fa6fc37908676d9 /src/scanner.l | |
parent | 0165662ac50544cad138573c42097999327b84bc (diff) | |
download | Doxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.zip Doxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.tar.gz Doxygen-a9a600c4692a1d0b0a6a09362db1d6da8bda9a30.tar.bz2 |
Release-1.4.6-20060202
Diffstat (limited to 'src/scanner.l')
-rw-r--r-- | src/scanner.l | 87 |
1 files changed, 83 insertions, 4 deletions
diff --git a/src/scanner.l b/src/scanner.l index 4465b9a..bb941f7 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -158,6 +158,9 @@ static bool docBlockInBody; static bool docBlockJavaStyle; static char docBlockTerm; +static QCString idlAttr; +static QCString idlProp; + //----------------------------------------------------------------------------- @@ -657,6 +660,10 @@ IDLATTR ("["[^\]]*"]"){BN}* %x CopyArgCommentLine %x CopyArgVerbatim +%x IDLAttribute +%x IDLProp +%x IDLPropName + /** Prototype scanner states */ %x Prototype @@ -2189,11 +2196,14 @@ IDLATTR ("["[^\]]*"]"){BN}* } <FindMembers>"[" { - if (current->name.isEmpty() || current->name=="typedef") // IDL function property - { - squareCount=1; + if (current->name.isEmpty() || current->name=="typedef") // IDL function property + { + squareCount=1; lastSquareContext = YY_START; - BEGIN(SkipSquare); + idlAttr.resize(0); + idlProp.resize(0); + current->mtype = mtype; + BEGIN( IDLAttribute ); } else { @@ -2202,6 +2212,75 @@ IDLATTR ("["[^\]]*"]"){BN}* BEGIN( Array ) ; } } +<IDLAttribute>"]" { + // end of IDL function attribute + if (--squareCount<=0) + { + lineCount(); + if (current->mtype == Property) + BEGIN( IDLPropName ); + else + BEGIN( lastSquareContext ); + } + } +<IDLAttribute>"propput" { + current->mtype = Property; + current->memSpec |= Entry::Settable; + } +<IDLAttribute>"propget" { + current->mtype = Property; + current->memSpec |= Entry::Gettable; + } +<IDLAttribute>. { + } +<IDLPropName>{BN}*{ID}{BN}* { + // return type (probably HRESULT) - skip it + } +<IDLPropName>{ID}{BN}*"(" { + current->name = yytext; + current->name = current->name.left(current->name.length()-1).stripWhiteSpace(); + current->startLine = yyLineNr; + BEGIN( IDLProp ); + } +<IDLProp>{BN}*"["[^\]]*"]"{BN}* { // attribute of a parameter + idlAttr += yytext; + } +<IDLProp>{ID} { // property type + idlProp = yytext; + } +<IDLProp>{BN}*{ID}{BN}*"," { // Rare: Another parameter ([propput] HRESULT Item(int index, [in] Type theRealProperty);) + if (!current->args) + current->args = "("; + else + current->args += ", "; + current->args += idlAttr; + current->args += " "; + current->args += idlProp; // prop was actually type of extra parameter + current->args += " "; + current->args += yytext; + current->args = current->args.left(current->args.length() - 1); // strip comma + idlProp.resize(0); + idlAttr.resize(0); + BEGIN( IDLProp ); + } +<IDLProp>{BN}*{ID}{BN}*")"{BN}* { + // the parameter name for the property - just skip. + } +<IDLProp>";" { + current->fileName = yyFileName; + current->type = idlProp; + current->args = current->args.simplifyWhiteSpace(); + if (current->args) + current->args += ")"; + current->name = current->name.stripWhiteSpace(); + current->section = Entry::VARIABLE_SEC; + current_root->addSubEntry(current); + current = new Entry; + initEntry(); + BEGIN( FindMembers ); + } +<IDLProp>. { + } <Array>"]" { current->args += *yytext ; if (--squareCount<=0) BEGIN( FindMembers ) ; |