diff options
Diffstat (limited to 'src/code.l')
-rw-r--r-- | src/code.l | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -36,6 +36,7 @@ #include <ctype.h> #include <qregexp.h> #include <qdir.h> +#include <qstack.h> #include "code.h" #include "entry.h" @@ -402,6 +403,34 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP} RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"(" RAWEND ")"[^ \t\(\)\\]{0,16}\" + //- start: NUMBER ------------------------------------------------------------------------- + // Note same defines in commentcnv.l: keep in sync +DECIMAL_INTEGER [1-9][0-9']*[0-9]?[uU]?[lL]?[lL]? +HEXADECIMAL_INTEGER "0"[xX][0-9a-zA-Z']+[0-9a-zA-Z]? +OCTAL_INTEGER "0"[0-7][0-7']+[0-7]? +BINARY_INTEGER "0"[bB][01][01']*[01]? +INTEGER_NUMBER {DECIMAL_INTEGER}|{HEXADECIMAL_INTEGER}|{OCTAL_INTEGER}|{BINARY_INTEGER} + +FP_SUF [fFlL] + +DIGIT_SEQ [0-9][0-9']*[0-9]? +FRAC_CONST {DIGIT_SEQ}"."|{DIGIT_SEQ}?"."{DIGIT_SEQ} +FP_EXP [eE][+-]?{DIGIT_SEQ} +DEC_FP1 {FRAC_CONST}{FP_EXP}?{FP_SUF}? +DEC_FP2 {DIGIT_SEQ}{FP_EXP}{FP_SUF} + +HEX_DIGIT_SEQ [0-9a-fA-F][0-9a-fA-F']*[0-9a-fA-F]? +HEX_FRAC_CONST {HEX_DIGIT_SEQ}"."|{HEX_DIGIT_SEQ}?"."{HEX_DIGIT_SEQ} +BIN_EXP [pP][+-]?{DIGIT_SEQ} +HEX_FP1 "0"[xX]{HEX_FRAC_CONST}{BIN_EXP}{FP_SUF}? +HEX_FP2 "0"[xX]{HEX_DIGIT_SEQ}{BIN_EXP}{FP_SUF}? + +FLOAT_DECIMAL {DEC_FP1}|{DEC_FP2} +FLOAT_HEXADECIMAL {HEX_FP1}|{HEX_FP2} +FLOAT_NUMBER {FLOAT_DECIMAL}|{FLOAT_HEXADECIMAL} +NUMBER {INTEGER_NUMBER}|{FLOAT_NUMBER} + //- end: NUMBER --------------------------------------------------------------------------- + %option noyywrap %x SkipString @@ -571,7 +600,7 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" // absPath = QDir::cleanDirPath(yyextra->sourceFileDef->getPath()+"/"+absPath); //} - FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig); + const FileDef *fd=findFileDef(Doxygen::inputNameLinkedMap,yytext,ambig); //printf("looking for include %s -> %s fd=%p\n",yytext,absPath.data(),fd); if (fd && fd->isLinkable()) { @@ -1251,6 +1280,10 @@ RAWEND ")"[^ \t\(\)\\]{0,16}\" yyextra->inForEachExpression = FALSE; BEGIN( SkipString ); } +<FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>{NUMBER} { //Note similar code in commentcnv.l + if (yyextra->lang!=SrcLangExt_Cpp) REJECT; + yyextra->code->codify(yytext); + } <FuncCall,Body,MemberCall,MemberCall2,SkipInits,InlineInit>\' { startFontClass(yyscanner,"stringliteral"); yyextra->code->codify(yytext); |