19%option never-interactive
20%option prefix="doctokenizerYY"
22%option extra-type="struct doctokenizerYY_state *"
26#define YY_TYPEDEF_YY_SCANNER_T
54#define YY_NO_UNISTD_H 1
92 std::stack< std::unique_ptr<DocLexerContext> >
lexerStack;
98#define lineCount(s,len) do { for(int i=0;i<(int)len;i++) if (s[i]=='\n') yyextra->yyLineNr++; } while(0)
111 int nl1 = text.
find(
'\n');
112 int nl2 = text.
find(
"\\ilinebr");
113 if (nl1!=-1 && nl1<nl2)
115 return text.
mid(nl1+1);
119 if (text.
at(nl2+8)==
' ') nl2++;
120 return text.
mid(nl2+8);
129 if (str==0 || length==std::string::npos)
return 0;
133 for (i=0;i<length;i++)
137 indent+=tabSize - (indent%tabSize);
139 else if (str[i]==
'\n')
147 if (str[i+1]==
' ') i++;
160#define unput_string(yytext,yyleng) do { for (int i=(int)yyleng-1;i>=0;i--) unput(yytext[i]); } while(0)
164#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
171#define YY_DECL static Token doctokenizerYYlex(yyscan_t yyscanner)
174#define yyterminate() return Token::make_TK_EOF()
The common base class of all entity definitions found in the sources.
This is an alternative implementation of QCString.
int find(char c, int index=0, bool cs=TRUE) const
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
char & at(size_t i)
Returns a reference to the character at index i.
#define Config_getInt(name)
QCString extractPartAfterNewLine(const QCString &text)
static void processSection(yyscan_t yyscanner)
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static void handleHtmlTag(yyscan_t yyscanner, const char *text)
static const char * getLexerFILE()
static int computeIndent(const char *str, size_t length)
Portable versions of functions that are platform dependent.
Some helper functions for std::string.
bool literal_at(const char *data, const char(&str)[N])
returns TRUE iff data points to a substring that matches string literal str
DocLexerContext(const TokenInfo &tk, int r, int lvl, yy_size_t pos, const char *s, YY_BUFFER_STATE bs)
Data associated with a token used by the comment block parser.
const Definition * definition
std::stack< int > stateStack
std::stack< std::unique_ptr< DocLexerContext > > lexerStack
183ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
184LABELID [a-z_A-Z\x80-\xFF][a-z_A-Z0-9\x80-\xFF\-]*
185CODEID [a-zA-Z][a-zA-Z0-9+]*
186PHPTYPE [?]?[\\:a-z_A-Z0-9\x80-\xFF\-]+
187CITESCHAR [a-z_A-Z0-9\x80-\xFF\-\?]
188CITEECHAR [a-z_A-Z0-9\x80-\xFF\-\+:\/\?]
189CITEID {CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*|"\""{CITESCHAR}{CITEECHAR}*("."{CITESCHAR}{CITEECHAR}*)*"\""
190DOXYCFG [A-Z][A-Z_0-9]*
191MAILADDR ("mailto:")?[a-z_A-Z0-9\x80-\xFF.+-]+"@"[a-z_A-Z0-9\x80-\xFf-]+("."[a-z_A-Z0-9\x80-\xFf\-]+)+[a-z_A-Z0-9\x80-\xFf\-]+
192MAILWS [\t a-z_A-Z0-9\x80-\xFF+-]
193MAILADDR2 {MAILWS}+{BLANK}+("at"|"AT"|"_at_"|"_AT_"){BLANK}+{MAILWS}+("dot"|"DOT"|"_dot_"|"_DOT_"|"point"|"POINT"|"_point_"|"_POINT_"){BLANK}+{MAILWS}+
194LISTITEM {BLANK}*[-]("#")?{WS}
195MLISTITEM {BLANK}*[+*]{WS}
196OLISTITEM {BLANK}*("0"|[1-9][0-9]*)"."{BLANK}
197CLISTITEM {BLANK}*[-]{BLANK}*"\["[ xX]"\]"
198ENDLIST {BLANK}*"."{BLANK}*(\n|"\\ilinebr")
199ATTRNAME [a-z_A-Z\x80-\xFF][:a-z_A-Z0-9\x80-\xFF\-]*
200ATTRIB {ATTRNAME}{WS}*("="{WS}*(("\""[^\"]*"\"")|("'"[^\']*"'")|[^ \t\r\n'"><]+))?
201URLCHAR [a-z_A-Z0-9\!\~\,\:\;\'\$\?\@\&\%\#\.\-\+\/\=\x80-\xFF]
202URLMASK ({URLCHAR}+([({]{URLCHAR}*[)}])?)+
203URLPROTOCOL ("http:"|"https:"|"ftp:"|"ftps:"|"sftp:"|"file:"|"news:"|"irc:"|"ircs:")
204FILEICHAR [a-z_A-Z0-9\x80-\xFF\\:\\\/\-\+=&#@~]
205FILEECHAR [a-z_A-Z0-9\x80-\xFF\-\+=&#@~]
206FILECHARS {FILEICHAR}*{FILEECHAR}+
207HFILEMASK {FILEICHAR}*("."{FILEICHAR}+)+{FILECHARS}*
208VFILEMASK {FILECHARS}("."{FILECHARS})*
209FILEMASK {VFILEMASK}|{HFILEMASK}
210LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"){BLANK}+)?
211VERBATIM "verbatim"{BLANK}*
212SPCMD1 {CMD}([a-z_A-Z][a-z_A-Z0-9]*|{VERBATIM}|"--"|"---")
213SPCMD2 {CMD}[\\@<>&$#%~".+=|!?-]
214SPCMD3 {CMD}_form#[0-9]+
217INOUT "in"|"out"|("in"{BLANK}*","?{BLANK}*"out")|("out"{BLANK}*","?{BLANK}*"in")
218PARAMIO {CMD}param{BLANK}*"["{BLANK}*{INOUT}{BLANK}*"]"
220TEMPCHAR [a-z_A-Z0-9.,: \t\*\&\(\)\[\]]
221FUNCCHAR [a-z_A-Z0-9,:<> \t\n\^\*\&\[\]]|{VARARGS}|"\\ilinebr"
222FUNCPART {FUNCCHAR}*("("{FUNCCHAR}*")"{FUNCCHAR}*)?
224TEMPLPART "<"{TEMPCHAR}*("<"{TEMPCHAR}*("<"{TEMPCHAR}*">")?">")?">"
225ANONNS "anonymous_namespace{"[^}]*"}"
226SCOPEPRE (({ID}{TEMPLPART}?)|{ANONNS}){SCOPESEP}
227SCOPEKEYS ":"({ID}":")*
228SCOPECPP {SCOPEPRE}*(~)?{ID}{TEMPLPART}?
229SCOPECPPN {SCOPEPRE}*(~)?{ID}
230SCOPEOBJC {SCOPEPRE}?{ID}{SCOPEKEYS}?
231SCOPEMASK {SCOPECPP}|{SCOPEOBJC}
232SCOPEMSKN {SCOPECPPN}|{SCOPEOBJC}
233FUNCARG "("{FUNCPART}")"({BLANK}*("volatile"|"const"){BLANK})?
234FUNCARG2 "("{FUNCPART}")"({BLANK}*("volatile"|"const"))?
235OPNEW {BLANK}+"new"({BLANK}*"[]")?
236OPDEL {BLANK}+"delete"({BLANK}*"[]")?
237OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"|"<=>"
238OPCAST {BLANK}+[^<(\r\n.,][^(\r\n.,]*
239OPMASK ({BLANK}*{OPNORM}{FUNCARG})
240OPMASKOPT ({BLANK}*{OPNORM}{FUNCARG}?)|({OPCAST}{FUNCARG})
241OPMASKOP2 ({BLANK}*{OPNORM}{FUNCARG2}?)|({OPCAST}{FUNCARG2})
242LNKWORD1 ("::"|"#")?{SCOPEMASK}
243LNKWORDN ("::"|"#")?{SCOPEMSKN}
244CVSPEC {BLANK}*("const"|"volatile")
245LNKWORD2 (({SCOPEPRE}*"operator"{OPMASK})|({SCOPEPRE}"operator"{OPMASKOPT})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOPT})){CVSPEC}?
246LNKWORD3 ([0-9a-z_A-Z\-]+("/"|"\\"))*[0-9a-z_A-Z\-]+("."[0-9a-z_A-Z]+)+
247CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
248ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'")
249CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."=']
250WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""([^"\n]*(\\\"|\n)?)*[^"\n]*"\"")
251WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
252WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}"
253WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'"
254CAPTION [cC][aA][pP][tT][iI][oO][nN]
255HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">"
256HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u"|"del"|"ins"|"s"
257HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"SUP"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"|"STRIKE"|"U"|"DEL"|"INS"|"S"
258HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
259HTMLTAG_STRICT "<"(("/")?){HTMLKEYW}({WS}+{ATTRIB})*{WS}*(("/")?)">"
260REFWORD2_PRE ("#"|"::")?((({ID}{TEMPLPART}?)|{ANONNS})("."|"#"|"::"|"-"|"/"))*({ID}{TEMPLPART}?(":")?)
261REFWORD2 {REFWORD2_PRE}{FUNCARG2}?
262REFWORD2_NOCV {REFWORD2_PRE}("("{FUNCPART}")")?
263REFWORD3 ({ID}":")*{ID}":"?
264REFWORD4_NOCV (({SCOPEPRE}*"operator"{OPMASKOP2})|(("::"|"#"){SCOPEPRE}*"operator"{OPMASKOP2}))
265REFWORD4 {REFWORD4_NOCV}{CVSPEC}?
266REFWORD {FILEMASK}|{LABELID}|{REFWORD2}|{REFWORD3}|{REFWORD4}
267REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV}
268RCSID "$"("Author"|"Date"|"Header"|"Id"|"Locker"|"Log"|"Name"|"RCSfile"|"Revision"|"Source"|"State")":"[^:\n$][^\n$]*"$"
269LINENR {BLANK}*([1-9][0-9]*|"0"|"-1")
271SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[0-9]{1,2})?)?
338<St_Para>^{LISTITEM} {
339 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
342 uint32_t dashPos =
static_cast<uint32_t
>(text.findRev(
'-'));
343 assert(dashPos!=
static_cast<uint32_t
>(-1));
344 yyextra->token.isEnumList = text.at(dashPos+1)==
'#';
345 yyextra->token.isCheckedList =
false;
346 yyextra->token.id = -1;
348 return Token::make_TK_LISTITEM();
#define lineCount(s, len)
350<St_Para>^{CLISTITEM} {
352 int dashPos = text.
findRev(
'-');
353 yyextra->token.isEnumList =
false;
354 yyextra->token.isCheckedList =
true;
359 return Token::make_TK_LISTITEM();
int findRev(char c, int index=-1, bool cs=TRUE) const
361<St_Para>^{MLISTITEM} {
362 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
369 std::string text(yytext);
370 static const reg::Ex re(R
"([*+][^*+]*$)");
373 size_t listPos =
match.position();
374 assert(listPos!=std::string::npos);
375 yyextra->token.isEnumList =
false;
376 yyextra->token.isCheckedList =
false;
377 yyextra->token.id = -1;
379 return Token::make_TK_LISTITEM();
Class representing a regular expression.
Object representing the matching results.
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
bool match(std::string_view str, Match &match, const Ex &re)
Matches a given string str for a match against regular expression re.
382<St_Para>^{OLISTITEM} {
383 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
389 std::string text(yytext);
390 static const reg::Ex re(R
"(\d+)");
393 size_t markPos =
match.position();
394 assert(markPos!=std::string::npos);
395 yyextra->token.isEnumList =
true;
396 yyextra->token.isCheckedList =
false;
399 yyextra->token.id = ok ? id : -1;
402 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
405 return Token::make_TK_LISTITEM();
int toInt(bool *ok=nullptr, int base=10) const
#define warn(file, line, fmt,...)
408<St_Para>{BLANK}*(\n|"\\ilinebr"){LISTITEM} {
409 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
412 uint32_t dashPos =
static_cast<uint32_t
>(text.
findRev(
'-'));
413 assert(dashPos!=
static_cast<uint32_t
>(-1));
414 yyextra->token.isEnumList = text.
at(dashPos+1)==
'#';
415 yyextra->token.isCheckedList =
false;
416 yyextra->token.id = -1;
418 return Token::make_TK_LISTITEM();
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
420<St_Para>{BLANK}*\n{CLISTITEM} {
423 int dashPos = text.
findRev(
'-');
424 yyextra->token.isEnumList =
false;
425 yyextra->token.isCheckedList =
true;
430 return Token::make_TK_LISTITEM();
size_t length() const
Returns the length of the string, not counting the 0-terminator.
QCString right(size_t len) const
432<St_Para>{BLANK}*(\n|"\\ilinebr"){MLISTITEM} {
433 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
441 static const reg::Ex re(R
"([*+][^*+]*$)");
444 size_t markPos =
match.position();
445 assert(markPos!=std::string::npos);
446 yyextra->token.isEnumList =
FALSE;
447 yyextra->token.isCheckedList =
false;
448 yyextra->token.id = -1;
450 return Token::make_TK_LISTITEM();
const std::string & str() const
453<St_Para>{BLANK}*(\n|"\\ilinebr"){OLISTITEM} {
454 if (yyextra->insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre)
462 static const reg::Ex re(R
"(\d+)");
465 size_t markPos =
match.position();
466 assert(markPos!=std::string::npos);
467 yyextra->token.isEnumList =
true;
468 yyextra->token.isCheckedList =
false;
471 yyextra->token.id = ok ? id : -1;
474 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid number for list item '{}' ",
match.str());
477 return Token::make_TK_LISTITEM();
481 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
485 return Token::make_TK_ENDLIST();
487<St_Para>{BLANK}*(\n|"\\ilinebr"){ENDLIST} {
488 if (yyextra->insideHtmlLink || yyextra->insidePre) REJECT;
491 size_t dotPos =
static_cast<size_t>(text.
findRev(
'.'));
493 return Token::make_TK_ENDLIST();
495<St_Para>"{"{BLANK}*"@linkplain"/{WS}+ {
496 yyextra->token.name =
"javalinkplain";
497 return Token::make_TK_COMMAND_AT();
499<St_Para>"{"{BLANK}*"@link"/{WS}+ {
500 yyextra->token.name =
"javalink";
501 return Token::make_TK_COMMAND_AT();
503<St_Para>"{"{BLANK}*"@inheritDoc"{BLANK}*"}" {
504 yyextra->token.name =
"inheritdoc";
505 return Token::make_TK_COMMAND_AT();
511 yyextra->token.name =
"_form";
static Token char_to_command(char c)
520 yyextra->token.name = yytext+1;
521 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
525<St_Para>"\\ilinebr" {
531 yyextra->token.name = yytext+1;
532 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
537 yyextra->token.name =
"param";
539 bool isIn = s.find(
"in")!=-1;
540 bool isOut = s.find(
"out")!=-1;
562<St_Para>{URLPROTOCOL}{URLMASK}/[,\.] {
563 yyextra->token.name=yytext;
564 yyextra->token.isEMailAddr=
FALSE;
565 return Token::make_TK_URL();
567<St_Para>{URLPROTOCOL}{URLMASK} {
568 yyextra->token.name=yytext;
569 yyextra->token.isEMailAddr=
FALSE;
570 return Token::make_TK_URL();
572<St_Para>"<"{URLPROTOCOL}{URLMASK}">" {
573 yyextra->token.name=yytext;
574 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
575 yyextra->token.isEMailAddr=
FALSE;
576 return Token::make_TK_URL();
579 yyextra->token.name=yytext;
580 yyextra->token.name.stripPrefix(
"mailto:");
581 yyextra->token.isEMailAddr=
TRUE;
582 return Token::make_TK_URL();
584<St_Para>"<"{MAILADDR}">" {
585 yyextra->token.name=yytext;
586 yyextra->token.name = yyextra->token.name.mid(1,yyextra->token.name.length()-2);
587 yyextra->token.name.stripPrefix(
"mailto:");
588 yyextra->token.isEMailAddr=
TRUE;
589 return Token::make_TK_URL();
591<St_Para>"<"{MAILADDR2}">" {
592 yyextra->token.name=yytext;
593 return Token::make_TK_WORD();
597 int index=tagName.find(
':');
598 if (index<0) index=0;
599 yyextra->token.name = tagName.left(index);
600 int text_begin = index+2;
601 int text_end =
static_cast<int>(tagName.length())-1;
602 if (tagName[text_begin-1]==
':')
605 if (tagName[text_end-1]==
'#')
610 yyextra->token.text = tagName.mid(text_begin,text_end-text_begin);
611 return Token::make_TK_RCSTAG();
613<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}")" |
614<St_Para,St_HtmlOnly,St_ManOnly,St_LatexOnly,St_RtfOnly,St_XmlOnly,St_DbOnly>"$("{ID}"("{ID}"))" {
616 name = name.left(
static_cast<int>(name.length())-1);
618 for (
int i=
static_cast<int>(value.
length())-1;i>=0;i--) unput(value.
at(i));
QCString getenv(const QCString &variable)
620<St_Para>"<blockquote>‍" {
624 YY_CURRENT_BUFFER->yy_at_bol=1;
627 return Token::make_TK_HTMLTAG();
632 return Token::make_TK_HTMLTAG();
634<St_Para,St_Text>"&"{ID}";" {
635 yyextra->token.name = yytext;
636 return Token::make_TK_SYMBOL();
641<St_Para>{ID}/"<"{HTMLKEYW}">"+ {
644 yyextra->token.name = yytext;
645 return Token::make_TK_LNKWORD();
647<St_Para>{LNKWORDN}/("<"{HTMLKEYW}">")+ {
648 yyextra->token.name = yytext;
649 return Token::make_TK_LNKWORD();
652<St_Para>{LNKWORD1}{FUNCARG} |
655 yyextra->token.name = yytext;
656 return Token::make_TK_LNKWORD();
658<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
659 yyextra->token.name = yytext;
660 yyextra->token.name = yyextra->token.name.left(yyextra->token.name.length()-1);
661 unput(yytext[(
int)yyleng-1]);
662 return Token::make_TK_LNKWORD();
666<St_Para,St_Text>[\-+0-9] |
667<St_Para,St_Text>{WORD1} |
668<St_Para,St_Text>{WORD2} {
669 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
672 yyextra->token.name = &yytext[1];
674 yyextra->token.name = yytext;
675 return Token::make_TK_WORD();
677<St_Text>({ID}".")+{ID} {
678 yyextra->token.name = yytext;
679 return Token::make_TK_WORD();
681<St_Para,St_Text>"operator"/{BLANK}*"<"[a-zA-Z_0-9]+">" {
683 yyextra->token.name = yytext;
684 return Token::make_TK_WORD();
689<St_Para,St_Text>{BLANK}+ |
690<St_Para,St_Text>{BLANK}*\n{BLANK}* {
692 yyextra->token.chars=yytext;
693 return Token::make_TK_WHITESPACE();
695<St_Text>[\\@<>&$#%~] {
696 yyextra->token.name = yytext;
699<St_Para>({BLANK}*\n)+{BLANK}*\n/{LISTITEM} {
700 if (yyextra->insidePre || yyextra->autoListLevel==0)
706<St_Para>({BLANK}*\n)+{BLANK}*\n/{CLISTITEM} {
707 if (yyextra->insidePre || yyextra->autoListLevel==0)
712<St_Para>({BLANK}*\n)+{BLANK}*\n/{MLISTITEM} {
713 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
719<St_Para>({BLANK}*\n)+{BLANK}*\n/{OLISTITEM} {
720 if (!yyextra->markdownSupport || yyextra->insidePre || yyextra->autoListLevel==0)
726<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}*/" \\ifile" |
727<St_Para,St_Param>({BLANK}*(\n|"\\ilinebr"))+{BLANK}*(\n|"\\ilinebr"){BLANK}* {
729 if (yyextra->insidePre)
731 yyextra->token.chars=yytext;
732 return Token::make_TK_WHITESPACE();
740 for (i=0;i<yyextra->token.indent;i++)
746 YY_CURRENT_BUFFER->yy_at_bol=1;
748 return Token::make_TK_NEWPARA();
751<St_CodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
752 yyextra->token.name = yytext;
753 int i=yyextra->token.name.find(
'{');
754 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
757<St_iCodeOpt>{BLANK}*"{"(".")?{CODEID}"}" {
758 yyextra->token.name = yytext;
759 int i=yyextra->token.name.find(
'{');
760 yyextra->token.name = yyextra->token.name.mid(i+1,yyextra->token.name.length()-i-2);
763<St_CodeOpt>"\\ilinebr" |
769<St_iCodeOpt>"\\ilinebr" |
775<St_Code>{WS}*{CMD}"endcode" {
777 return Token::make_RetVal_OK();
779<St_iCode>{WS}*{CMD}"endicode" {
781 return Token::make_RetVal_OK();
783<St_XmlCode>{WS}*"</code>" {
785 return Token::make_RetVal_OK();
787<St_Code,St_iCode,St_XmlCode>[^\\@\n<]+ |
788<St_Code,St_iCode,St_XmlCode>\n |
789<St_Code,St_iCode,St_XmlCode>. {
791 yyextra->token.verb+=yytext;
793<St_HtmlOnlyOption>" [block]" {
794 yyextra->token.name=
"block";
797<St_HtmlOnlyOption>.|\n {
801<St_HtmlOnlyOption>"\\ilinebr" {
805<St_HtmlOnly>{CMD}"endhtmlonly" {
806 return Token::make_RetVal_OK();
808<St_HtmlOnly>[^\\@\n$]+ |
812 yyextra->token.verb+=yytext;
814<St_ManOnly>{CMD}"endmanonly" {
815 return Token::make_RetVal_OK();
817<St_ManOnly>[^\\@\n$]+ |
821 yyextra->token.verb+=yytext;
823<St_RtfOnly>{CMD}"endrtfonly" {
824 return Token::make_RetVal_OK();
826<St_RtfOnly>[^\\@\n$]+ |
830 yyextra->token.verb+=yytext;
832<St_LatexOnly>{CMD}"endlatexonly" {
833 return Token::make_RetVal_OK();
835<St_LatexOnly>[^\\@\n]+ |
839 yyextra->token.verb+=yytext;
841<St_XmlOnly>{CMD}"endxmlonly" {
842 return Token::make_RetVal_OK();
844<St_XmlOnly>[^\\@\n]+ |
848 yyextra->token.verb+=yytext;
850<St_DbOnly>{CMD}"enddocbookonly" {
851 return Token::make_RetVal_OK();
853<St_DbOnly>[^\\@\n]+ |
857 yyextra->token.verb+=yytext;
859<St_Verbatim>{CMD}"endverbatim" {
860 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
861 return Token::make_RetVal_OK();
863<St_ILiteral>{CMD}"endiliteral " {
865 yyextra->token.verb = yyextra->token.verb.mid(1,yyextra->token.verb.length()-2);
866 return Token::make_RetVal_OK();
868<St_iVerbatim>{CMD}"endiverbatim" {
869 yyextra->token.verb = yyextra->token.verb.stripLeadingAndTrailingEmptyLines();
870 return Token::make_RetVal_OK();
872<St_Verbatim,St_iVerbatim,St_ILiteral>[^\\@\n]+ |
873<St_Verbatim,St_iVerbatim,St_ILiteral>\n |
874<St_Verbatim,St_iVerbatim,St_ILiteral>. {
876 yyextra->token.verb+=yytext;
878<St_ILiteralOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
880 return Token::make_RetVal_OK();
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
882<St_ILiteralOpt>"\\ilinebr" |
883<St_ILiteralOpt>"\n" |
885 yyextra->token.sectionId =
"";
887 return Token::make_RetVal_OK();
889<St_Dot>{CMD}"enddot" {
890 return Token::make_RetVal_OK();
896 yyextra->token.verb+=yytext;
898<St_Msc>{CMD}("endmsc") {
899 return Token::make_RetVal_OK();
905 yyextra->token.verb+=yytext;
907<St_PlantUMLOpt>{BLANK}*"{"[a-zA-Z_,:0-9\. ]*"}" {
909 return Token::make_RetVal_OK();
911<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/{ID}"=" {
913 return Token::make_RetVal_OK();
915<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANK}+/"\"" {
917 return Token::make_RetVal_OK();
919<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/\n {
921 return Token::make_RetVal_OK();
923<St_PlantUMLOpt>{BLANK}*{FILEMASK}{BLANKopt}/"\\ilinebr" {
925 return Token::make_RetVal_OK();
927<St_PlantUMLOpt>"\\ilinebr" |
928<St_PlantUMLOpt>"\n" |
930 yyextra->token.sectionId =
"";
932 return Token::make_RetVal_OK();
934<St_PlantUML>{CMD}"enduml" {
935 return Token::make_RetVal_OK();
937<St_PlantUML>[^\\@\n]+ |
941 yyextra->token.verb+=yytext;
947 yyextra->token.chars=yytext;
948 return Token::make_TK_WHITESPACE();
956 return Token::make_TK_NONE();
958<St_Title>"\\ilinebr" {
960 return Token::make_TK_NONE();
962<St_TitleN>"&"{ID}";" {
963 yyextra->token.name = yytext;
964 return Token::make_TK_SYMBOL();
966<St_TitleN>{HTMLTAG} {
967 yyextra->token.name = yytext;
969 return Token::make_TK_HTMLTAG();
973 return Token::make_TK_NONE();
975<St_TitleN>"\\ilinebr" {
977 return Token::make_TK_NONE();
981 yyextra->token.name = yytext+1;
987 yyextra->token.name = &yytext[1];
989 yyextra->token.name = yytext;
990 return Token::make_TK_WORD();
995 if (
QCString(yytext).find(
"\\ilinebr")!=-1) REJECT;
998 yyextra->token.name = &yytext[1];
1000 yyextra->token.name = yytext;
1001 return Token::make_TK_WORD();
1004 yyextra->token.chars=yytext;
1005 return Token::make_TK_WHITESPACE();
1007<St_TitleQ>"&"{ID}";" {
1008 yyextra->token.name = yytext;
1009 return Token::make_TK_SYMBOL();
1011<St_TitleQ>(\n|"\\ilinebr") {
1013 return Token::make_TK_NONE();
1015<St_TitleQ>{SPCMD1} |
1016<St_TitleQ>{SPCMD2} {
1017 yyextra->token.name = yytext+1;
1021<St_TitleQ>{WORD1NQ} |
1022<St_TitleQ>{WORD2NQ} {
1023 yyextra->token.name = yytext;
1024 return Token::make_TK_WORD();
1027 yyextra->token.chars=yytext;
1028 return Token::make_TK_WHITESPACE();
1032 return Token::make_TK_NONE();
1034<St_TitleA>{BLANK}*{ID}{BLANK}*"="{BLANK}* {
1035 yyextra->token.name = yytext;
1036 int pos = yyextra->token.name.find(
'=');
1038 yyextra->token.name = yyextra->token.name.left(pos).stripWhiteSpace();
1041<St_TitleV>[^ \t\r\n]+ {
1043 yyextra->token.chars = yytext;
1045 return Token::make_TK_WORD();
1047<St_TitleV,St_TitleA>. {
1049 return Token::make_TK_NONE();
1051<St_TitleV,St_TitleA>(\n|"\\ilinebr") {
1053 return Token::make_TK_NONE();
1056<St_Anchor>{LABELID}{WS}? {
1059 return Token::make_TK_WORD();
1063 return Token::make_TK_NONE();
1066 if (yytext[0] ==
'"')
1068 yyextra->token.name=yytext+1;
1069 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-2);
1073 yyextra->token.name=yytext;
1075 return Token::make_TK_WORD();
1079 return Token::make_TK_NONE();
1081<St_Cite>(\n|"\\ilinebr") {
1083 return Token::make_TK_NONE();
1087 return Token::make_TK_NONE();
1089<St_DoxyConfig>{DOXYCFG} {
1090 yyextra->token.name=yytext;
1091 return Token::make_TK_WORD();
1093<St_DoxyConfig>{BLANK} {
1095 return Token::make_TK_NONE();
1097<St_DoxyConfig>(\n|"\\ilinebr") {
1099 return Token::make_TK_NONE();
1103 return Token::make_TK_NONE();
1105<St_Ref>{REFWORD_NOCV}/{BLANK}("const")[a-z_A-Z0-9] {
1106 yyextra->token.name=yytext;
1107 return Token::make_TK_WORD();
1109<St_Ref>{REFWORD_NOCV}/{BLANK}("volatile")[a-z_A-Z0-9] {
1110 yyextra->token.name=yytext;
1111 return Token::make_TK_WORD();
1114 yyextra->token.name=yytext;
1115 return Token::make_TK_WORD();
1119 return Token::make_TK_NONE();
1121<St_Ref>{WS}+"\""{WS}* {
1122 yyextra->expectQuote=
true;
1126<St_Ref>(\n|"\\ilinebr") {
1128 return Token::make_TK_NONE();
1130<St_Ref>"\""[^"\n]+"\"" {
1131 yyextra->token.name=
QCString(yytext).
mid(1,yyleng-2);
1132 return Token::make_TK_WORD();
1136 return Token::make_TK_NONE();
1138<St_IntRef>[A-Z_a-z0-9.:/#\-\+\(\)]+ {
1139 yyextra->token.name = yytext;
1140 return Token::make_TK_WORD();
1142<St_IntRef>{BLANK}+"\"" {
1145<St_SetScope>({SCOPEMASK}|{ANONNS}){BLANK}|{FILEMASK} {
1146 yyextra->token.name = yytext;
1147 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1148 return Token::make_TK_WORD();
1150<St_SetScope>{SCOPEMASK}"<" {
1151 yyextra->token.name = yytext;
1152 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1153 yyextra->sharpCount=1;
1154 BEGIN(St_SetScopeEnd);
1156<St_SetScope>{BLANK} {
1158<St_SetScopeEnd>"<" {
1159 yyextra->token.name += yytext;
1160 yyextra->sharpCount++;
1162<St_SetScopeEnd>">" {
1163 yyextra->token.name += yytext;
1164 yyextra->sharpCount--;
1165 if (yyextra->sharpCount<=0)
1167 return Token::make_TK_WORD();
1171 yyextra->token.name += yytext;
1173<St_Ref2>"&"{ID}";" {
1174 yyextra->token.name = yytext;
1175 return Token::make_TK_SYMBOL();
1177<St_Ref2>"\""|\n|"\\ilinebr" {
1179 if (!yyextra->expectQuote || yytext[0]==
'"')
1181 return Token::make_TK_NONE();
1185 yyextra->token.name += yytext;
1188<St_Ref2>{HTMLTAG_STRICT} {
1191 return Token::make_TK_HTMLTAG();
1195 yyextra->token.name = yytext+1;
1202 yyextra->token.name = yytext;
1203 return Token::make_TK_WORD();
1206 yyextra->token.chars=yytext;
1207 return Token::make_TK_WHITESPACE();
1209<St_XRefItem>{LABELID} {
1210 yyextra->token.name=yytext;
1213 BEGIN(St_XRefItem2);
1215<St_XRefItem2>[0-9]+"." {
1217 numStr=numStr.left((
int)yyleng-1);
1218 yyextra->token.id=numStr.toInt();
1219 return Token::make_RetVal_OK();
1221<St_Para,St_Title,St_Ref2>"<!--" {
1222 yyextra->commentState = YY_START;
1225<St_Param>"\""[^\n\"]+"\"" {
1226 yyextra->token.name = yytext+1;
1227 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1228 return Token::make_TK_WORD();
1230<St_Param>({PHPTYPE}{BLANK}*("["{BLANK}*"]")*{BLANK}*"|"{BLANK}*)*{PHPTYPE}{BLANK}*("["{BLANK}*"]")*{WS}+("&")?"$"{LABELID} {
1233 int j = params.find(
'&');
1234 int i = params.find(
'$');
1236 if (j<i && j>=0) i=j;
1238 yyextra->token.name = types+
"#"+params.
mid(i);
1239 return Token::make_TK_WORD();
QCString left(size_t len) const
1241<St_Param>[^ \t\n,@\\]+ {
1242 yyextra->token.name = yytext;
1243 if (yyextra->token.name.at(
static_cast<uint32_t
>(yyleng)-1)==
':')
1245 yyextra->token.name=yyextra->token.name.left(
static_cast<uint32_t
>(yyleng)-1);
1247 return Token::make_TK_WORD();
1249<St_Param>{WS}*","{WS}*
1252 yyextra->token.chars=yytext;
1253 return Token::make_TK_WHITESPACE();
1255<St_Prefix>"\""[^\n\"]*"\"" {
1256 yyextra->token.name = yytext+1;
1257 yyextra->token.name = yyextra->token.name.left((
int)yyleng-2);
1258 return Token::make_TK_WORD();
1262 return Token::make_TK_NONE();
1265 yyextra->token.name+=yytext;
1267<St_Options>{WS}*":"{WS}* {
1269 yyextra->token.name+=
":";
1271<St_Options>{WS}*","{WS}* |
1274 yyextra->token.name+=
",";
1277 return Token::make_TK_WORD();
1280 yyextra->token.name+=yytext;
1283 return Token::make_TK_WORD();
1285<St_Emoji>[:0-9_a-z+-]+ {
1286 yyextra->token.name=yytext;
1287 return Token::make_TK_WORD();
1291 return Token::make_TK_NONE();
1293<St_QuotedString>"\"" {
1294 yyextra->token.name=
"";
1295 BEGIN(St_QuotedContent);
1297<St_QuotedString>(\n|"\\ilinebr") {
1299 return Token::make_TK_NONE();
1303 return Token::make_TK_NONE();
1305<St_QuotedContent>"\"" {
1306 return Token::make_TK_WORD();
1308<St_QuotedContent>. {
1309 yyextra->token.name+=yytext;
1311<St_ShowDate>{WS}+{SHOWDATE} {
1313 yyextra->token.name=yytext;
1314 return Token::make_TK_WORD();
1316<St_ShowDate>(\n|"\\ilinebr") {
1318 return Token::make_TK_NONE();
1322 return Token::make_TK_NONE();
1324<St_ILine>{LINENR}/[\\@\n\.] |
1325<St_ILine>{LINENR}{BLANK} {
1330 warn(yyextra->fileName,yyextra->yyLineNr,
"Invalid line number '{}' for iline command",yytext);
1334 yyextra->yyLineNr = nr;
1336 return Token::make_TK_WORD();
1339 return Token::make_TK_NONE();
1341<St_IFile>{BLANK}*{FILEMASK} {
1343 return Token::make_TK_WORD();
1345<St_IFile>{BLANK}*"\""[^\n\"]+"\"" {
1348 yyextra->fileName = text.
mid(1,text.
length()-2);
1349 return Token::make_TK_WORD();
1351<St_File>{FILEMASK} {
1352 yyextra->token.name = yytext;
1353 return Token::make_TK_WORD();
1355<St_File>"\""[^\n\"]+"\"" {
1357 yyextra->token.name = text.
mid(1,text.
length()-2);
1358 return Token::make_TK_WORD();
1360<St_Pattern>[^\\\r\n]+ {
1361 yyextra->token.name += yytext;
1363<St_Pattern>"\\ilinebr" {
1364 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1365 return Token::make_TK_WORD();
1369 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1370 return Token::make_TK_WORD();
1373 yyextra->token.name += yytext;
1375<St_Link>{LINKMASK}|{REFWORD} {
1376 yyextra->token.name = yytext;
1377 return Token::make_TK_WORD();
1380 BEGIN(yyextra->commentState);
1388<St_SkipTitle>(\n|"\\ilinebr") {
1389 if (*yytext ==
'\n') unput(
'\n');
1390 return Token::make_TK_NONE();
1395<St_Sections>[^\n@\<]+
1396<St_Sections>{CMD}("<"|{CMD})
1397<St_Sections>"<"{CAPTION}({WS}+{ATTRIB})*">" {
1400 int s=tag.find(
"id=");
1404 if (c==
'\'' || c==
'"')
1406 int e=tag.find(c,s+4);
1410 yyextra->secLabel=tag.mid(s+4,e-s-4);
static constexpr int Table
1416<St_Sections>{CMD}"anchor"{BLANK}+ {
1418 BEGIN(St_SecLabel1);
static constexpr int Anchor
1420<St_Sections>{CMD}"ianchor"{BLANK}+ {
1422 BEGIN(St_SecLabel1);
1424<St_Sections>{CMD}"section"{BLANK}+ {
1426 BEGIN(St_SecLabel2);
static constexpr int Section
1428<St_Sections>{CMD}"subsection"{BLANK}+ {
1430 BEGIN(St_SecLabel2);
static constexpr int Subsection
1432<St_Sections>{CMD}"subsubsection"{BLANK}+ {
1434 BEGIN(St_SecLabel2);
static constexpr int Subsubsection
1436<St_Sections>{CMD}"paragraph"{BLANK}+ {
1438 BEGIN(St_SecLabel2);
static constexpr int Paragraph
1440<St_Sections>{CMD}"subparagraph"{BLANK}+ {
1442 BEGIN(St_SecLabel2);
static constexpr int Subparagraph
1444<St_Sections>{CMD}"subsubparagraph"{BLANK}+ {
1446 BEGIN(St_SecLabel2);
static constexpr int Subsubparagraph
1448<St_Sections>{CMD}"verbatim"/[^a-z_A-Z0-9] {
1449 yyextra->endMarker=
"endverbatim";
1452<St_Sections>{CMD}"iverbatim"/[^a-z_A-Z0-9] {
1453 yyextra->endMarker=
"endiverbatim";
1456<St_Sections>{CMD}"iliteral"/[^a-z_A-Z0-9] {
1457 yyextra->endMarker=
"endiliteral";
1460<St_Sections>{CMD}"dot"/[^a-z_A-Z0-9] {
1461 yyextra->endMarker=
"enddot";
1464<St_Sections>{CMD}"msc"/[^a-z_A-Z0-9] {
1465 yyextra->endMarker=
"endmsc";
1468<St_Sections>{CMD}"startuml"/[^a-z_A-Z0-9] {
1469 yyextra->endMarker=
"enduml";
1472<St_Sections>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
1473 yyextra->endMarker=
"endhtmlonly";
1476<St_Sections>{CMD}"latexonly"/[^a-z_A-Z0-9] {
1477 yyextra->endMarker=
"endlatexonly";
1480<St_Sections>{CMD}"manonly"/[^a-z_A-Z0-9] {
1481 yyextra->endMarker=
"endmanonly";
1484<St_Sections>{CMD}"rtfonly"/[^a-z_A-Z0-9] {
1485 yyextra->endMarker=
"endrtfonly";
1488<St_Sections>{CMD}"xmlonly"/[^a-z_A-Z0-9] {
1489 yyextra->endMarker=
"endxmlonly";
1492<St_Sections>{CMD}"docbookonly"/[^a-z_A-Z0-9] {
1493 yyextra->endMarker=
"enddocbookonly";
1496<St_Sections>{CMD}"code"/[^a-z_A-Z0-9] {
1497 yyextra->endMarker=
"endcode";
1500<St_Sections>{CMD}"icode"/[^a-z_A-Z0-9] {
1501 yyextra->endMarker=
"endicode";
1504<St_Sections>"<!--" {
1505 yyextra->endMarker=
"-->";
1508<St_SecSkip>{CMD}{ID} {
1509 if (yyextra->endMarker==yytext+1)
1515 if (yyextra->endMarker==yytext)
1520<St_SecSkip>[^a-z_A-Z0-9\-\\\@]+
1522<St_SecSkip>(\n|"\\ilinebr")
1524<St_Sections>(\n|"\\ilinebr")
1525<St_SecLabel1>{LABELID} {
1527 yyextra->secLabel = yytext;
1531<St_SecLabel2>{LABELID}{BLANK}+ |
1532<St_SecLabel2>{LABELID} {
1533 yyextra->secLabel = yytext;
1534 yyextra->secLabel = yyextra->secLabel.stripWhiteSpace();
1537<St_SecTitle>[^\n]+ |
1538<St_SecTitle>[^\n]*\n {
1540 yyextra->secTitle = yytext;
1541 yyextra->secTitle = yyextra->secTitle.stripWhiteSpace();
1542 if (yyextra->secTitle.endsWith(
"\\ilinebr"))
1544 yyextra->secTitle.left(yyextra->secTitle.length()-8);
1549<St_SecTitle,St_SecLabel1,St_SecLabel2>. {
1550 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}' while looking for section label or title",yytext);
1553<St_Snippet>[^\\\n]+ {
1554 yyextra->token.name += yytext;
1557 yyextra->token.name += yytext;
1559<St_Snippet>(\n|"\\ilinebr") {
1561 yyextra->token.name = yyextra->token.name.stripWhiteSpace();
1562 return Token::make_TK_WORD();
1568 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected new line character");
1574 yyextra->token.name = yytext;
1578 warn(yyextra->fileName,yyextra->yyLineNr,
"Unexpected character '{}'",yytext);
1586 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1588 const char *p = yyextra->inputString + yyextra->inputPos;
1589 while ( c < max_size && *p ) { *buf++ = *p++; c++; }
1590 yyextra->inputPos+=c;
1596 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1599 if (yyextra->definition)
1601 file = yyextra->definition->getOutputFileBase();
1605 warn(yyextra->fileName,yyextra->yyLineNr,
"Found section/anchor {} without context",yyextra->secLabel);
1611 si->
setType(yyextra->secType);
1617 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1620 yyextra->token.text = tagText;
1621 yyextra->token.attribs.
clear();
1622 yyextra->token.endTag =
FALSE;
1623 yyextra->token.emptyTag =
FALSE;
1627 if (tagText.
at(1)==
'/')
1629 yyextra->token.endTag =
TRUE;
1634 int i = startNamePos;
1635 for (i=startNamePos; i < (int)yyleng; i++)
1638 char c = tagText.
at(i);
1639 if (!(isalnum(c) || c==
'-' || c==
'_' || c==
':'))
break;
1641 yyextra->token.name = tagText.
mid(startNamePos,i-startNamePos);
1645 int startAttribList = i;
1646 while (i<(
int)yyleng)
1648 char c=tagText.
at(i);
1650 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1652 if (c ==
'>')
break;
1656 yyextra->token.emptyTag =
TRUE;
1661 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'=' && c!=
'>') { c=tagText.
at(++i); }
1664 optName = tagText.
mid(startName,endName-startName).
lower();
1666 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1667 if (tagText.
at(i)==
'=')
1669 int startAttrib=0, endAttrib=0;
1672 while (i<(
int)yyleng && isspace((uint8_t)c)) { c=tagText.
at(++i); }
1673 if (tagText.
at(i)==
'\'')
1679 while (i<(
int)yyleng && c!=
'\'') { c=tagText.
at(++i); }
1681 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1683 else if (tagText.
at(i)==
'"')
1688 while (i<(
int)yyleng && c!=
'"') { c=tagText.
at(++i); }
1690 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1696 while (i<(
int)yyleng && !isspace((uint8_t)c) && c!=
'>') { c=tagText.
at(++i); }
1698 if (i<(
int)yyleng) { c=tagText.
at(++i);}
1700 optValue = tagText.
mid(startAttrib,endAttrib-startAttrib);
1701 if (optName ==
"align") optValue = optValue.
lower();
1702 else if (optName ==
"valign")
1704 optValue = optValue.
lower();
1705 if (optValue ==
"center") optValue=
"middle";
1713 yyextra->token.attribs.emplace_back(optName,optValue);
1715 yyextra->token.attribsStr = tagText.
mid(startAttribList,i-startAttribList);
1728 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1730 yyextra->lexerStack.push(
1731 std::make_unique<DocLexerContext>(
1732 yyextra->token,YY_START,
1733 yyextra->autoListLevel,
1735 yyextra->inputString,
1736 YY_CURRENT_BUFFER));
1737 yy_switch_to_buffer(yy_create_buffer(0,
YY_BUF_SIZE, yyscanner), yyscanner);
1743 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1745 if (yyextra->lexerStack.empty())
return FALSE;
1746 const auto &ctx = yyextra->lexerStack.top();
1747 yyextra->autoListLevel = ctx->autoListLevel;
1748 yyextra->inputPos = ctx->inputPos;
1749 yyextra->inputString = ctx->inputString;
1750 yyextra->token = ctx->token;
1752 yy_delete_buffer(YY_CURRENT_BUFFER, yyscanner);
1753 yy_switch_to_buffer(ctx->state, yyscanner);
1756 yyextra->lexerStack.pop();
1764 doctokenizerYYlex_init_extra(&
p->extra,&
p->yyscanner);
1773 doctokenizerYYlex_destroy(
p->yyscanner);
1778 return doctokenizerYYlex(
p->yyscanner);
1784 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1792 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1796 yyextra->inputString = input.
data();
1798 yyextra->inputPos = 0;
1799 yyextra->definition = d;
1800 yyextra->fileName = fileName;
1802 yyextra->yyLineNr = 1;
1803 doctokenizerYYlex(yyscanner);
1809 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1810 yyextra->autoListLevel = 0;
1811 yyextra->inputString = input;
1812 yyextra->inputPos = 0;
1813 yyextra->fileName = fileName;
1814 yyextra->insidePre =
FALSE;
1815 yyextra->markdownSupport = markdownSupport;
1816 yyextra->insideHtmlLink = insideHtmlLink;
1823 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1824 return &yyextra->token;
1830 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1832 return &yyextra->token;
1838 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1839 yyextra->insideHtmlLink =
false;
1846 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1853 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1860 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1861 yyextra->token.verb=
"";
1862 yyextra->token.name=
"";
1869 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1870 yyextra->token.verb=
"";
1871 yyextra->token.name=
"";
1878 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1879 yyextra->token.verb=
"";
1880 yyextra->token.name=
"";
1887 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1888 yyextra->token.verb=
"";
1889 yyextra->token.name=
"";
1890 BEGIN(St_HtmlOnlyOption);
1896 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1897 yyextra->token.verb=
"";
1904 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1905 yyextra->token.verb=
"";
1912 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1913 yyextra->token.verb=
"";
1920 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1921 yyextra->token.verb=
"";
1928 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1929 yyextra->token.verb=
"";
1930 BEGIN(St_LatexOnly);
1936 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1937 yyextra->token.verb=
"";
1944 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1945 yyextra->token.verb=
"";
1946 BEGIN(St_ILiteralOpt);
1952 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1953 yyextra->token.verb=
"";
1960 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1961 yyextra->token.verb=
"";
1962 BEGIN(St_iVerbatim);
1968 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1969 yyextra->token.verb=
"";
1976 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1977 yyextra->token.verb=
"";
1984 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1985 yyextra->token.verb=
"";
1986 yyextra->token.sectionId=
"";
1987 BEGIN(St_PlantUMLOpt);
1993 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
1994 yyextra->token.verb=
"";
2001 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2008 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2015 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2022 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2029 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2030 yyextra->token.name =
"";
2037 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2044 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2051 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2052 BEGIN(St_DoxyConfig);
2058 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2059 yyextra->expectQuote=
false;
2066 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2073 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2080 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2081 BEGIN(St_SkipTitle);
2087 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2094 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2101 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2102 yyextra->token.name=
"";
2109 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2116 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2117 yyextra->token.name=
"";
2124 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2125 yyextra->token.name=
"";
2132 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2133 yyextra->token.name=
"";
2140 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2147 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2148 BEGIN(St_QuotedString);
2154 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2161 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2162 yy_delete_buffer( YY_CURRENT_BUFFER, yyscanner );
2168 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2169 yyextra->insidePre = b;
2175 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2177 int l =
static_cast<int>(tagName.
length());
2179 for (
int i=l-1;i>=0;i--)
2189 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2190 yyextra->autoListLevel++;
2196 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2197 yyextra->autoListLevel--;
2203 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2204 yyextra->yyLineNr = lineno;
2210 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2211 return yyextra->yyLineNr;
2217 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2218 yyextra->stateStack.push(YYSTATE);
2224 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
2225 assert(!yyextra->stateStack.empty());
2226 BEGIN(yyextra->stateStack.top());
2227 yyextra->stateStack.pop();
2230#include "doctokenizer.l.h"
static bool isFlagSet(const DebugMask mask)
void setStateTitleAttrValue()
void setStateILiteralOpt()
void init(const char *input, const QCString &fileName, bool markdownSupport, bool insideHtmlLink)
void setLineNr(int lineno)
void setStatePlantUMLOpt()
void findSections(const QCString &input, const Definition *d, const QCString &fileName)
void setInsidePre(bool b)
void unputString(const QCString &tag)
void setStateInternalRef()
void setStateDoxyConfig()
void setStateQuotedString()
std::unique_ptr< Private > p
void pushBackHtmlTag(const QCString &tag)
const T * find(const std::string &key) const
bool isEmpty() const
Returns TRUE iff the string is empty.
class that provide information about a section.
void setType(SectionType t)
void setFileName(const QCString &fn)
static SectionManager & instance()
returns a reference to the singleton
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
const char * qPrint(const char *s)
doctokenizerYY_state extra