diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-27 14:39:01 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2018-10-27 14:39:01 (GMT) |
commit | 3a42bcf6a6ef583015752c705c8923e6b1905c05 (patch) | |
tree | 5148a04aace214735468d2e3144f3efcbe7f6968 /src | |
parent | 681038d8137ef9ba36b575aada4ae8526631001a (diff) | |
parent | dff7c1af885ceb0210f6c529df4e16b0ebf19164 (diff) | |
download | Doxygen-3a42bcf6a6ef583015752c705c8923e6b1905c05.zip Doxygen-3a42bcf6a6ef583015752c705c8923e6b1905c05.tar.gz Doxygen-3a42bcf6a6ef583015752c705c8923e6b1905c05.tar.bz2 |
Merge branch 'albert-github-feature/bug_warning_msg'
Diffstat (limited to 'src')
-rw-r--r-- | src/docparser.cpp | 223 | ||||
-rw-r--r-- | src/docparser.h | 2 | ||||
-rw-r--r-- | src/doctokenizer.h | 3 | ||||
-rw-r--r-- | src/doctokenizer.l | 27 |
4 files changed, 92 insertions, 163 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index ad7f00e..bf9558f 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -56,6 +56,8 @@ #include "markdown.h" #include "htmlentity.h" +#define TK_COMMAND_CHAR(token) ((token)==TK_COMMAND_AT ? '@' : '\\') + // debug off #define DBG(x) do {} while(0) @@ -866,7 +868,31 @@ static bool findDocsForMemberOrCompound(const char *commandName, return FALSE; } //--------------------------------------------------------------------------- +inline void errorHandleDefaultToken(DocNode *parent,int tok, + QList<DocNode> &children,const char *txt) +{ + switch (tok) + { + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: + children.append(new DocWord(parent,TK_COMMAND_CHAR(tok) + g_token->name)); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a %s", + qPrint(TK_COMMAND_CHAR(tok) + g_token->name), txt); + break; + case TK_SYMBOL: + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found found as part of a %s", + qPrint(g_token->name), txt); + break; + default: + children.append(new DocWord(parent,g_token->name)); + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s found as part of a %s", + tokToString(tok), txt); + break; + } +} +//--------------------------------------------------------------------------- // forward declaration static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children,bool @@ -876,6 +902,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, const QCString &cmdName) { DBG(("handleStyleArgument(%s)\n",qPrint(cmdName))); + QCString saveCmdName = cmdName; int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { @@ -901,14 +928,6 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, { switch (tok) { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command \\%s as the argument of a \\%s command", - qPrint(g_token->name),qPrint(cmdName)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found while handling command %s", - qPrint(g_token->name),qPrint(cmdName)); - break; case TK_HTMLTAG: if (insideLI(parent) && Mappers::htmlTagMapper->map(g_token->name) && g_token->endTag) { // ignore </li> as the end of a style command @@ -917,8 +936,7 @@ static int handleStyleArgument(DocNode *parent,QList<DocNode> &children, return tok; break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s while handling command %s", - tokToString(tok),qPrint(cmdName)); + errorHandleDefaultToken(parent,tok,children,"\\" + saveCmdName + " command"); break; } break; @@ -1297,21 +1315,7 @@ static void defaultHandleTitleAndSize(const int cmd, DocNode *parent, QList<DocN } if (!defaultHandleToken(parent,tok,children)) { - switch (tok) - { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\%s", - qPrint(g_token->name), Mappers::cmdMapper->find(cmd).data()); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; - default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; - } + errorHandleDefaultToken(parent,tok,children,Mappers::cmdMapper->find(cmd).data()); } } // parse size attributes @@ -1370,7 +1374,7 @@ static bool defaultHandleToken(DocNode *parent,int tok, QList<DocNode> &children { DBG(("token %s at %d",tokToString(tok),doctokenizerYYlineno)); if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL || - tok==TK_COMMAND || tok==TK_HTMLTAG + tok==TK_COMMAND_AT || tok==TK_COMMAND_BS || tok==TK_HTMLTAG ) { DBG((" name=%s",qPrint(g_token->name))); @@ -1380,7 +1384,9 @@ reparsetoken: QCString tokenName = g_token->name; switch (tok) { - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: switch (Mappers::cmdMapper->map(tokenName)) { case CMD_BSLASH: @@ -2334,21 +2340,7 @@ void DocSecRefItem::parse() { if (!defaultHandleToken(this,tok,m_children)) { - switch (tok) - { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\refitem", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; - default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; - } + errorHandleDefaultToken(this,tok,m_children,"\\refitem"); } } doctokenizerYYsetStatePara(); @@ -2396,7 +2388,7 @@ void DocSecRefList::parse() // handle items while (tok) { - if (tok==TK_COMMAND) + if (tok==TK_COMMAND_AT || tok == TK_COMMAND_BS) { switch (Mappers::cmdMapper->map(g_token->name)) { @@ -2476,21 +2468,7 @@ void DocInternalRef::parse() { if (!defaultHandleToken(this,tok,m_children)) { - switch (tok) - { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\ref", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; - default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; - } + errorHandleDefaultToken(this,tok,m_children,"\\ref"); } } @@ -2634,19 +2612,10 @@ void DocRef::parse() { switch (tok) { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\ref", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; case TK_HTMLTAG: break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); + errorHandleDefaultToken(this,tok,m_children,"\\ref"); break; } } @@ -2757,7 +2726,9 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink) { switch (tok) { - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: switch (Mappers::cmdMapper->map(g_token->name)) { case CMD_ENDLINK: @@ -2773,13 +2744,13 @@ QCString DocLink::parse(bool isJavaLink,bool isXmlLink) } break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found as part of a \\link", qPrint(g_token->name)); break; case TK_HTMLTAG: if (g_token->name!="see" || !isXmlLink) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected xml/html command %s found", + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected xml/html command %s found as part of a \\link", qPrint(g_token->name)); } goto endlink; @@ -2957,21 +2928,7 @@ void DocVhdlFlow::parse() { if (!defaultHandleToken(this,tok,m_children)) { - switch (tok) - { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a \\vhdlflow", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; - default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; - } + errorHandleDefaultToken(this,tok,m_children,"\\vhdlflow"); } } tok=doctokenizerYYlex(); @@ -3018,10 +2975,6 @@ int DocHtmlHeader::parse() { switch (tok) { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a <h%d> tag", - qPrint(g_token->name),m_level); - break; case TK_HTMLTAG: { int tagId=Mappers::htmlTagMapper->map(g_token->name); @@ -3099,14 +3052,10 @@ int DocHtmlHeader::parse() } break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; + char tmp[20]; + sprintf(tmp,"<h%d>tag",m_level); + errorHandleDefaultToken(this,tok,m_children,tmp); } } } @@ -3138,14 +3087,6 @@ int DocHRef::parse() { switch (tok) { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a <a>..</a> block", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; case TK_HTMLTAG: { @@ -3162,8 +3103,7 @@ int DocHRef::parse() } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok),doctokenizerYYlineno); + errorHandleDefaultToken(this,tok,m_children,"<a>..</a> block"); break; } } @@ -3296,7 +3236,9 @@ int DocIndexEntry::parse() } } break; - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: switch (Mappers::cmdMapper->map(g_token->name)) { case CMD_BSLASH: m_entry+='\\'; break; @@ -3384,14 +3326,6 @@ int DocHtmlCaption::parse() { switch (tok) { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a <caption> tag", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; case TK_HTMLTAG: { int tagId=Mappers::htmlTagMapper->map(g_token->name); @@ -3408,9 +3342,7 @@ int DocHtmlCaption::parse() } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; + errorHandleDefaultToken(this,tok,m_children,"<caption> tag"); } } } @@ -3923,7 +3855,9 @@ int DocHtmlDescTitle::parse() { switch (tok) { - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: { QCString cmdName=g_token->name; bool isJavaLink=FALSE; @@ -3934,7 +3868,7 @@ int DocHtmlDescTitle::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", + warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command", qPrint(g_token->name)); } else @@ -3943,7 +3877,7 @@ int DocHtmlDescTitle::parse() tok=doctokenizerYYlex(); // get the reference id if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of \\%s command", tokToString(tok),qPrint(cmdName)); } else @@ -3964,7 +3898,7 @@ int DocHtmlDescTitle::parse() int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", + warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after \\%s command", qPrint(cmdName)); } else @@ -3973,7 +3907,7 @@ int DocHtmlDescTitle::parse() tok=doctokenizerYYlex(); if (tok!=TK_WORD) { - warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of \\%s command", tokToString(tok),qPrint(cmdName)); } else @@ -3992,13 +3926,13 @@ int DocHtmlDescTitle::parse() break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a <dt> tag", + warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command \\%s found as part of a <dt> tag", qPrint(g_token->name)); } } break; case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol \\%s found as part of a <dt> tag", qPrint(g_token->name)); break; case TK_HTMLTAG: @@ -4039,7 +3973,7 @@ int DocHtmlDescTitle::parse() } break; default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", + warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s found as part of a <dt> tag", tokToString(tok)); break; } @@ -4544,21 +4478,7 @@ void DocTitle::parse() { if (!defaultHandleToken(this,tok,m_children)) { - switch (tok) - { - case TK_COMMAND: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Illegal command %s as part of a title section", - qPrint(g_token->name)); - break; - case TK_SYMBOL: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unsupported symbol %s found", - qPrint(g_token->name)); - break; - default: - warn_doc_error(g_fileName,doctokenizerYYlineno,"Unexpected token %s", - tokToString(tok)); - break; - } + errorHandleDefaultToken(this,tok,m_children,"title section"); } } doctokenizerYYsetStatePara(); @@ -5419,7 +5339,7 @@ void DocPara::handleInheritDoc() } -int DocPara::handleCommand(const QCString &cmdName) +int DocPara::handleCommand(const QCString &cmdName, const int tok) { DBG(("handleCommand(%s)\n",qPrint(cmdName))); int retval = RetVal_OK; @@ -5427,6 +5347,7 @@ int DocPara::handleCommand(const QCString &cmdName) switch (cmdId) { case CMD_UNKNOWN: + m_children.append(new DocWord(this,TK_COMMAND_CHAR(tok) + cmdName)); warn_doc_error(g_fileName,doctokenizerYYlineno,"Found unknown command `\\%s'",qPrint(cmdName)); break; case CMD_EMPHASIS: @@ -6529,7 +6450,7 @@ int DocPara::parse() reparsetoken: DBG(("token %s at %d",tokToString(tok),doctokenizerYYlineno)); if (tok==TK_WORD || tok==TK_LNKWORD || tok==TK_SYMBOL || tok==TK_URL || - tok==TK_COMMAND || tok==TK_HTMLTAG + tok==TK_COMMAND_AT || tok == TK_COMMAND_BS || tok==TK_HTMLTAG ) { DBG((" name=%s",qPrint(g_token->name))); @@ -6627,7 +6548,7 @@ reparsetoken: } else // other section { - tok = TK_COMMAND; + tok = TK_COMMAND_BS; } DBG(("reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; @@ -6672,7 +6593,9 @@ reparsetoken: "list items"); } break; - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: { // see if we have to start a simple section int cmd = Mappers::cmdMapper->map(g_token->name); @@ -6708,7 +6631,7 @@ reparsetoken: } // handle the command - retval=handleCommand(g_token->name); + retval=handleCommand(g_token->name,tok); DBG(("handleCommand returns %x\n",retval)); // check the return value @@ -6726,7 +6649,7 @@ reparsetoken: } else // other section { - tok = TK_COMMAND; + tok = TK_COMMAND_BS; } DBG(("reparsing command %s\n",qPrint(g_token->name))); goto reparsetoken; @@ -6998,7 +6921,9 @@ void DocText::parse() } } break; - case TK_COMMAND: + case TK_COMMAND_AT: + // fall through + case TK_COMMAND_BS: switch (Mappers::cmdMapper->map(g_token->name)) { case CMD_BSLASH: diff --git a/src/docparser.h b/src/docparser.h index 68f9fc1..2bc716a 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -1155,7 +1155,7 @@ class DocPara : public CompAccept<DocPara> bool isFirst() const { return m_isFirst; } bool isLast() const { return m_isLast; } - int handleCommand(const QCString &cmdName); + int handleCommand(const QCString &cmdName,const int tok); int handleHtmlStartTag(const QCString &tagName,const HtmlAttribList &tagHtmlAttribs); int handleHtmlEndTag(const QCString &tagName); int handleSimpleSection(DocSimpleSect::Type t,bool xmlContext=FALSE); diff --git a/src/doctokenizer.h b/src/doctokenizer.h index b3b9fa5..c12e77e 100644 --- a/src/doctokenizer.h +++ b/src/doctokenizer.h @@ -34,12 +34,13 @@ enum Tokens TK_WHITESPACE = 3, TK_LISTITEM = 4, TK_ENDLIST = 5, - TK_COMMAND = 6, + TK_COMMAND_AT = 6, //! Command starting with `@` TK_HTMLTAG = 7, TK_SYMBOL = 8, TK_NEWPARA = 9, TK_RCSTAG = 10, TK_URL = 11, + TK_COMMAND_BS = 12, //! Command starting with `\` RetVal_OK = 0x10000, RetVal_SimpleSec = 0x10001, diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 3118cfd..5cd97a8 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -41,6 +41,8 @@ #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 + +#define TK_COMMAND_SEL() (yytext[0] == '@' ? TK_COMMAND_AT : TK_COMMAND_BS) //-------------------------------------------------------------------------- @@ -116,12 +118,13 @@ const char *tokToString(int token) case TK_WHITESPACE: return "TK_WHITESPACE"; case TK_LISTITEM: return "TK_LISTITEM"; case TK_ENDLIST: return "TK_ENDLIST"; - case TK_COMMAND: return "TK_COMMAND"; + case TK_COMMAND_AT: return "TK_COMMAND_AT"; case TK_HTMLTAG: return "TK_HTMLTAG"; case TK_SYMBOL: return "TK_SYMBOL"; case TK_NEWPARA: return "TK_NEWPARA"; case TK_RCSTAG: return "TK_RCSTAG"; case TK_URL: return "TK_URL"; + case TK_COMMAND_BS: return "TK_COMMAND_BS"; } return "ERROR"; } @@ -558,11 +561,11 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} } <St_Para>"{"{BLANK}*"@link"/{BLANK}+ { g_token->name = "javalink"; - return TK_COMMAND; + return TK_COMMAND_AT; } <St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" { g_token->name = "inheritdoc"; - return TK_COMMAND; + return TK_COMMAND_AT; } <St_Para>"@_fakenl" { // artificial new line yylineno++; @@ -572,14 +575,14 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} bool ok; g_token->id = QCString(yytext).right((int)yyleng-6).toInt(&ok); ASSERT(ok); - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Para>{CMD}"n"\n { /* \n followed by real newline */ yylineno++; g_token->name = yytext+1; g_token->name = g_token->name.stripWhiteSpace(); g_token->paramDir=TokenInfo::Unspecified; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Para>{SPCMD1} | <St_Para>{SPCMD2} | @@ -587,7 +590,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} g_token->name = yytext+1; g_token->name = g_token->name.stripWhiteSpace(); g_token->paramDir=TokenInfo::Unspecified; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Para>{PARAMIO} { /* param [in,out] command */ g_token->name = "param"; @@ -613,7 +616,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} { g_token->paramDir=TokenInfo::Unspecified; } - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Para>("http:"|"https:"|"ftp:"|"file:"|"news:"){URLMASK}/\. { // URL. g_token->name=yytext; @@ -733,7 +736,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} } <St_Text>[\\@<>&$#%~] { g_token->name = yytext; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} { /* skip trailing paragraph followed by new list item */ if (g_insidePre || g_autoListLevel==0) @@ -926,7 +929,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_TitleN>{SPCMD2} { /* special command */ g_token->name = yytext+1; g_token->paramDir=TokenInfo::Unspecified; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_TitleN>{ID}"=" { /* attribute */ if (yytext[0]=='%') // strip % if present @@ -960,7 +963,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_TitleQ>{SPCMD2} { /* special command */ g_token->name = yytext+1; g_token->paramDir=TokenInfo::Unspecified; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_TitleQ>{WORD1NQ} | <St_TitleQ>{WORD2NQ} { /* word */ @@ -1091,7 +1094,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <St_Ref2>{SPCMD2} { /* special command */ g_token->name = yytext+1; g_token->paramDir=TokenInfo::Unspecified; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <St_Ref2>{WORD1NQ} | <St_Ref2>{WORD2NQ} { @@ -1323,7 +1326,7 @@ REFWORD_NOCV {LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} <*>[\\@<>&$#%~"=] { /* unescaped special character */ //warn(g_fileName,yylineno,"Unexpected character `%s', assuming command \\%s was meant.",yytext,yytext); g_token->name = yytext; - return TK_COMMAND; + return TK_COMMAND_SEL(); } <*>. { warn(g_fileName,yylineno,"Unexpected character `%s'",yytext); |