15%option never-interactive
16%option prefix="lexscannerYY"
18%option extra-type="struct lexscannerYY_state *"
24#define YY_TYPEDEF_YY_SCANNER_T
47#define YY_NO_UNISTD_H 1
49#define repeatChar(chr, cnt) DString().fill(chr,cnt)
95#define YY_INPUT(buf,result,max_size) result=yyread(yyscanner,buf,max_size);
C-like language parser using state-based lexical scanning.
Clang parser object for a single translation unit, which consists of a source file and the directly o...
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
static int yyread(yyscan_t yyscanner, char *buf, int max_size)
static const char * stateToString(int state)
static void handleCCode(yyscan_t yyscanner)
static const char * getLexerFILE()
int lastPreLineCtrlContext
ClangTUParser * clangParser
std::shared_ptr< Entry > current
std::shared_ptr< Entry > current_root
COutlineParser cOutlineParser
A bunch of utility functions.
113RulesSharp "<"[^>\n]*">"
114RulesCurly "{"[^{}\n]*"}"
119EscapeRulesCharOpen "\\["|"\<"|"\\{"|"\\("|"\\\""|"\\ "|"\\\\"
120EscapeRulesCharClose "\\]"|"\>"|"\\}"|"\\)"
121EscapeRulesChar {EscapeRulesCharOpen}|{EscapeRulesCharClose}
128ID [$a-z_A-Z\x80-\xFF][$a-z_A-Z0-9\x80-\xFF]*
131RAWBEGIN (u|U|L|u8)?R\"[^ \t\(\)\\]{0,16}"("
132RAWEND ")"[^ \t\(\)\\]{0,16}\"
133CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
144DCOMM ("/\*!"|"/\**"|"/\/!"|"/\/\/")
185<DefSection>{Option} {
188<Option>"prefix"{ws}*"="{ws}* {
191<OptPrefix>"\""[^\"]*"\"" {
192 yyextra->prefix = yytext;
193 yyextra->prefix = yyextra->prefix.mid(1,yyleng-2);
197 yyextra-> reentrant =
true;
199<Option>"bison-bridge" {
200 yyextra-> bison_bridge =
true;
202<Option>"bison-locations" {
203 yyextra-> bison_bridge =
true;
204 yyextra-> bison_locations =
true;
209 yyextra->cCodeBuffer += yytext;
212<DefSection>^{RulesStart} {
215 yyextra->cCodeBuffer +=
"int " + yyextra->prefix +
"lex (";
216 if (yyextra->bison_bridge )
218 if (fill) yyextra->cCodeBuffer +=
",";
219 yyextra->cCodeBuffer +=
"YYSTYPE * yylval_param";
222 if (yyextra->bison_locations)
224 if (fill) yyextra->cCodeBuffer +=
",";
225 yyextra->cCodeBuffer +=
"YYLTYPE * yylloc_param";
228 if (yyextra->reentrant)
230 if (fill) yyextra->cCodeBuffer +=
",";
231 yyextra->cCodeBuffer +=
"yyscan_t yyscanner";
234 if (!yyextra->bison_bridge && !yyextra->bison_locations && !yyextra->reentrant)
236 yyextra->cCodeBuffer +=
"void";
238 yyextra->cCodeBuffer +=
") {\n";
240 BEGIN (RulesSectionInit);
242<DefSection>^{TopStart} {
243 yyextra->cCodeBuffer +=
"\n";
244 yyextra->lastContext = YY_START;
247<DefSection>^{LiteralStart} {
248 yyextra->cCodeBuffer +=
"\n";
249 yyextra->lastContext = YY_START;
250 BEGIN (LiteralSection);
252<TopSection>^{TopEnd} {
253 yyextra->cCodeBuffer +=
"\n";
254 BEGIN( yyextra->lastContext ) ;
257 yyextra->cCodeBuffer += yytext;
259<LiteralSection>^{LiteralEnd} {
260 yyextra->cCodeBuffer +=
"\n";
261 BEGIN( yyextra->lastContext ) ;
263<LiteralSection>.*{nl} {
264 yyextra->cCodeBuffer += yytext;
267 BEGIN(DefSectionLine);
269<DefSection>{CPPC}.*{nl} {
270 yyextra->cCodeBuffer += yytext;
272<DefSection>^{ws}*{CCS} {
273 yyextra->cCodeBuffer += yytext;
274 yyextra->lastContext = YY_START;
277<COMMENT>{CCE}{ws}*{nl} {
278 yyextra->cCodeBuffer+=yytext;
279 BEGIN(yyextra->lastContext);
282 yyextra->cCodeBuffer+=yytext;
283 BEGIN(yyextra->lastContext);
286 yyextra->cCodeBuffer += yytext;
288<COMMENT>{CPPC}|{CCS} {
289 yyextra->cCodeBuffer += yytext;
292 yyextra->cCodeBuffer += yytext;
295 yyextra->cCodeBuffer += yytext;
298 yyextra->cCodeBuffer +=
"\n";
300<DefSection>^{ws}.*{nl} {
301 yyextra->cCodeBuffer += yytext;
303<DefSectionLine>.*{nl} {
304 yyextra->cCodeBuffer +=
"\n";
307<RulesSectionInit,RulesPattern>^{RulesEnd} {
308 yyextra->cCodeBuffer +=
"}\n";
311<RulesSectionInit>^{nws} {
315<RulesSectionInit>^{ws}.*{nl} {
316 yyextra->cCodeBuffer += yytext;
318<RulesSectionInit>^{nl} {
319 yyextra->cCodeBuffer += yytext;
321<RulesPattern>"<<EOF>>" {
322 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
#define repeatChar(chr, cnt)
324<RulesPattern>{EscapeRulesChar} {
325 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
327<RulesPattern>{RulesSharp} {
328 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
330<RulesPattern>{RulesCurly} {
331 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
333<RulesPattern>{StartDouble} {
334 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
335 yyextra->lastContext = YY_START;
338<RulesDouble,RulesRoundDouble>"\\\\" {
339 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
341<RulesDouble,RulesRoundDouble>"\\\"" {
342 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
345 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
346 BEGIN( yyextra->lastContext ) ;
348<RulesRoundDouble>"\"" {
349 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
352<RulesDouble,RulesRoundDouble>. {
353 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
355<RulesPattern>{StartSquare} {
356 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
357 yyextra->lastContext = YY_START;
360<RulesSquare,RulesRoundSquare>{CHARCE} {
361 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
363<RulesSquare,RulesRoundSquare>"\\[" |
364<RulesSquare,RulesRoundSquare>"\\]" {
365 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
368 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
371<RulesRoundSquare>"]" {
372 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
375<RulesSquare,RulesRoundSquare>"\\\\" {
376 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
378<RulesSquare,RulesRoundSquare>. {
379 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
381<RulesPattern>{StartRoundQuest} {
382 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
383 yyextra->lastContext = YY_START;
384 BEGIN(RulesRoundQuest);
386<RulesRoundQuest>{nl} {
387 yyextra->cCodeBuffer +=
"\n";
389<RulesRoundQuest>[^)] {
390 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
392<RulesRoundQuest>")" {
393 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
394 BEGIN(yyextra->lastContext);
396<RulesPattern>{StartRound} {
397 yyextra->roundCount++;
398 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
399 yyextra->lastContext = YY_START;
402<RulesRound>{RulesCurly} {
403 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
405<RulesRound>{StartSquare} {
406 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
407 BEGIN(RulesRoundSquare);
409<RulesRound>{StartDouble} {
410 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
411 BEGIN(RulesRoundDouble);
413<RulesRound>{EscapeRulesChar} {
414 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
417 yyextra->roundCount++;
418 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
421 yyextra->roundCount--;
422 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
423 if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
426 yyextra->cCodeBuffer +=
"\n";
429 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
432 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
434<RulesPattern>{ws}+"|" {
435 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
436 yyextra->curlyCount = 0;
439<RulesPattern>^{ws}*{nl} {
440 yyextra->cCodeBuffer +=
"\n";
442<RulesPattern>^{ws}+ {
445<RulesPattern>({ws}|{nl}) {
447 yyextra->curlyCount = 0;
450<RulesPattern>"\\\\" {
451 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
454 yyextra->cCodeBuffer += yytext;
455 yyextra->lastContext = YY_START;
459 yyextra->cCodeBuffer +=
repeatChar(
' ', yyleng);
461<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" {
462 yyextra->cCodeBuffer += yytext;
463 yyextra->lastPreLineCtrlContext = YY_START;
464 BEGIN( PreLineCtrl );
466<PreLineCtrl>"\""[^\n\"]*"\"" {
467 yyextra->cCodeBuffer += yytext;
470 yyextra->cCodeBuffer += yytext;
473 yyextra->cCodeBuffer += yytext;
474 BEGIN( yyextra->lastPreLineCtrlContext );
477 yyextra->cCodeBuffer += yytext;
478 ++yyextra->curlyCount ;
480<SkipCurly>"}"/{BN}*{DCOMM}"<!--" |
482 yyextra->cCodeBuffer += yytext;
483 if( yyextra->curlyCount )
485 --yyextra->curlyCount ;
488<SkipCurly>"}"{BN}*{DCOMM}"<" {
489 yyextra->cCodeBuffer += yytext;
490 if ( yyextra->curlyCount )
492 --yyextra->curlyCount ;
496 yyextra->docBlockContext = SkipCurlyEndDoc;
497 if (yytext[yyleng-3]==
'/')
508 yyextra->cCodeBuffer += yytext;
509 yyextra->lastStringContext=SkipCurly;
513 yyextra->cCodeBuffer += yytext;
514 yyextra->lastPreLineCtrlContext = YY_START;
515 BEGIN( PreLineCtrl );
517<SkipCurly>{B}*{RAWBEGIN} {
521 yyextra->lastRawStringContext = YY_START;
522 yyextra->cCodeBuffer += yytext;
DString extractBeginRawStringDelimiter(const char *rawStart)
525<SkipCurly>[^\n#"'@\\/{}<]+ {
526 yyextra->cCodeBuffer += yytext;
529 yyextra->cCodeBuffer += yytext;
530 yyextra->lastCContext = YY_START;
534 yyextra->cCodeBuffer += yytext;
535 yyextra->lastCContext = YY_START;
536 BEGIN(SkipCxxComment);
538<SkipCurly>{CHARLIT} {
539 yyextra->cCodeBuffer += yytext;
542 yyextra->cCodeBuffer += yytext;
545 yyextra->cCodeBuffer += yytext;
547<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
548 yyextra->cCodeBuffer += yytext;
549 yyextra->docBlockContext = YY_START;
552<SkipCurly>{CCS}"*"[*]+{BL} {
554 yyextra->cCodeBuffer += yytext;
557 yyextra->docBlockContext = YY_START;
#define Config_getBool(name)
565<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
566 yyextra->cCodeBuffer += yytext;
567 yyextra->docBlockContext = YY_START;
570<SkipCurly>{CPPC}"!" {
571 yyextra->cCodeBuffer += yytext;
572 yyextra->docBlockContext = YY_START;
575<SkipCurly>{CPPC}"/"/[^/] {
576 yyextra->cCodeBuffer += yytext;
577 yyextra->docBlockContext = YY_START;
582 yyextra->cCodeBuffer += yytext;
583 if (yyextra->curlyCount<=0)
589 yyextra->cCodeBuffer += yytext;
592 yyextra->cCodeBuffer += yytext;
593 BEGIN( yyextra->lastStringContext );
595<SkipString>{CCS}|{CCE}|{CPPC} {
596 yyextra->cCodeBuffer += yytext;
599 yyextra->cCodeBuffer += yytext;
602 yyextra->cCodeBuffer += yytext;
604<SkipCxxComment>.*"\\\n" {
605 yyextra->cCodeBuffer += yytext;
607<SkipCxxComment>{ANYopt}/\n {
608 yyextra->cCodeBuffer += yytext;
609 BEGIN( yyextra->lastCContext ) ;
612 yyextra->cCodeBuffer += yytext ;
614<Comment>{CCS} { yyextra->cCodeBuffer += yytext ; }
615<Comment>{CPPC} { yyextra->cCodeBuffer += yytext ; }
616<Comment>{CMD}("code"|"verbatim"|"iliteral") {
617 yyextra->insideCode=
true;
618 yyextra->cCodeBuffer += yytext ;
620<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
621 yyextra->insideCode=
false;
622 yyextra->cCodeBuffer += yytext ;
624<Comment>[^ \.\t\r\n\/\*]+ { yyextra->cCodeBuffer += yytext ; }
625<Comment>{CCE} { yyextra->cCodeBuffer += yytext ;
626 if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
628<Comment>. { yyextra->cCodeBuffer += *yytext ; }
630<SkipComment>{CPPC}|{CCS} {
631 yyextra->cCodeBuffer += yytext;
633<SkipComment>[^\*\n]+ {
634 yyextra->cCodeBuffer += yytext;
637 yyextra->cCodeBuffer += yytext;
639<SkipComment>{B}*{CCE} {
640 yyextra->cCodeBuffer += yytext;
641 BEGIN( yyextra->lastCContext );
644 yyextra->cCodeBuffer += yytext;
647 yyextra->cCodeBuffer += yytext;
650 BEGIN(yyextra->lastRawStringContext);
DString extractEndRawStringDelimiter(const char *rawEnd)
654 yyextra->cCodeBuffer += yytext;
657 yyextra->cCodeBuffer += yytext;
660 yyextra->cCodeBuffer += yytext;
665<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? {
666 yyextra->cCodeBuffer += yytext;
668<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" {
669 yyextra->cCodeBuffer += yytext;
670 BEGIN( yyextra->docBlockContext );
672<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" {
673 yyextra->cCodeBuffer += yytext;
674 BEGIN( yyextra->docBlockContext );
676<DocLine>{NONLopt}/"\n" {
677 yyextra->cCodeBuffer += yytext;
678 BEGIN( yyextra->docBlockContext );
684 yyextra->cCodeBuffer += yytext;
685 BEGIN(yyextra->docBlockContext);
687<DocBlock>^{B}*"*"+/[^/] {
688 yyextra->cCodeBuffer += yytext;
690<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] {
691 yyextra->cCodeBuffer += yytext;
693<DocBlock>^{B}*({CPPC}){B}* {
694 yyextra->cCodeBuffer += yytext;
697 yyextra->cCodeBuffer += yytext;
701 yyextra->cCodeBuffer += yytext;
703<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] {
704 yyextra->cCodeBuffer += yytext;
706<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
707 yyextra->cCodeBuffer += yytext;
708 yyextra->docBlockName=&yytext[1];
709 if (yyextra->docBlockName.at(1)==
'[')
711 yyextra->docBlockName.at(1)=
']';
713 if (yyextra->docBlockName.at(1)==
'{')
715 yyextra->docBlockName.at(1)=
'}';
717 if (yyextra->docBlockName.at(1)==
'(')
719 yyextra->docBlockName.at(1)=
')';
721 yyextra->fencedSize=0;
722 yyextra->nestedComment=
false;
725<DocBlock>{B}*"<"{PRE}">" {
726 yyextra->cCodeBuffer += yytext;
727 yyextra->docBlockName=
"<pre>";
728 yyextra->fencedSize=0;
729 yyextra->nestedComment=
false;
732<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] {
733 yyextra->cCodeBuffer += yytext;
734 yyextra->docBlockName=
"uml";
735 yyextra->fencedSize=0;
736 yyextra->nestedComment=
false;
739<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] {
740 yyextra->cCodeBuffer += yytext;
741 yyextra->docBlockName=&yytext[1];
742 yyextra->fencedSize=0;
743 yyextra->nestedComment=
false;
746<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
747 yyextra->cCodeBuffer += yytext;
749 yyextra->docBlockName=
"~~~";
751 yyextra->nestedComment=
false;
DString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
size_t length() const
Returns the length of the string, not counting the 0-terminator.
DString substitute(const DString &s, const DString &src, const DString &dst)
substitute all occurrences of src in s by dst
754<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
755 yyextra->cCodeBuffer += yytext;
757 yyextra->docBlockName=
"```";
759 yyextra->nestedComment=
false;
762<DocBlock>{B}*"<code>" {
765<DocBlock>[^@*~\/\\\n]+ {
766 yyextra->cCodeBuffer += yytext;
769 yyextra->cCodeBuffer += yytext;
772 yyextra->cCodeBuffer += yytext;
776<DocCopyBlock>"</"{PRE}">" {
777 yyextra->cCodeBuffer += yytext;
778 if (yyextra->docBlockName==
"<pre>")
783<DocCopyBlock>"</"{CODE}">" {
784 yyextra->cCodeBuffer += yytext;
785 if (yyextra->docBlockName==
"<code>")
790<DocCopyBlock>{CMD}("f$"|"f]"|"f}"|"f)") {
791 yyextra->cCodeBuffer += yytext;
792 if (yyextra->docBlockName==&yytext[1])
797<DocCopyBlock>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] {
798 yyextra->cCodeBuffer += yytext;
799 if (yyextra->docBlockName==&yytext[4])
804<DocCopyBlock>^{B}*"*"+/{BN}+ {
805 yyextra->cCodeBuffer += yytext;
806 if ((yyextra->docBlockName==
"verbatim") || (yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
812 yyextra->cCodeBuffer += yytext;
815<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* {
816 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
818 yyextra->cCodeBuffer += yytext;
825<DocCopyBlock>^{B}*"*"+/({ID}|"(") {
826 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
828 yyextra->cCodeBuffer += yytext;
835<DocCopyBlock>^{B}*"*"+/{BN}* {
836 if ((yyextra->docBlockName==
"code") || (yyextra->docBlockName==
"iliteral"))
838 if (yyextra->nestedComment)
840 yyextra->cCodeBuffer += yytext;
844 yyextra->cCodeBuffer += yytext;
852<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
853 yyextra->cCodeBuffer += yytext;
860<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
861 yyextra->cCodeBuffer += yytext;
868<DocCopyBlock>[^<@/\*\]~\$\\\n]+ {
869 yyextra->cCodeBuffer += yytext;
871<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
874 yyextra->nestedComment=
true;
876 else if (yytext[0]==
'*')
878 yyextra->nestedComment=
false;
880 yyextra->cCodeBuffer += yytext;
883 yyextra->cCodeBuffer += yytext;
886 yyextra->cCodeBuffer += yytext;
888<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" {
889 yyextra->docBlockContext = SkipCurlyEndDoc;
890 yyextra->cCodeBuffer += yytext;
891 if (yytext[yyleng-3]==
'/')
900<SkipCurlyEndDoc>"}" {
901 yyextra->cCodeBuffer += yytext;
906 yyextra->cCodeBuffer += yytext;
923 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
925 while( c < max_size && yyextra->inputString[yyextra->inputPosition] )
927 *buf = yyextra->inputString[yyextra->inputPosition++] ;
939 const std::shared_ptr<Entry> &rt,
942 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
944 yyextra->inputString = fileBuf;
945 yyextra->inputPosition = 0;
946 lexscannerYYrestart(0,yyscanner);
948 yyextra->current_root = rt;
949 yyextra->fileName = fileName;
950 yyextra->clangParser = clangParser;
952 rt->lang = yyextra->language;
953 msg(
"Parsing file {}...\n",yyextra->fileName);
955 yyextra->current_root = rt;
956 yyextra->current = std::make_shared<Entry>();
960 yyextra->current->name = yyextra->fileName;
961 yyextra->current->section =
EntryType(sec);
962 yyextra->current_root->moveToSubEntryAndRefresh(yyextra->current);
964 yyextra->current->reset();
967 lexscannerYYlex(yyscanner);
969 rt->program.str(std::string());
977 struct yyguts_t *yyg = (
struct yyguts_t*)yyscanner;
979 if (yyextra->cCodeBuffer.empty())
return;
980 yyextra->cOutlineParser.parseInput(yyextra->fileName,
981 yyextra->cCodeBuffer.data(),
982 yyextra->current_root,
983 yyextra->clangParser);
984 yyextra->cCodeBuffer.clear();
997 lexscannerYYlex_init_extra(&
p->state,&
p->yyscanner);
1005 lexscannerYYlex_destroy(
p->yyscanner);
1009 const char *fileBuf,
1010 const std::shared_ptr<Entry> &root,
1013 struct yyguts_t *yyg = (
struct yyguts_t*)
p->yyscanner;
1015 yyextra->fileName = fileName;
1018 ::parseMain(
p->yyscanner,fileName,fileBuf,root,clangParser);
1024#include "lexscanner.l.h"
static bool isFlagSet(const DebugMask mask)
Wrapper class for the Entry type.
static EntryType guessSection(const DString &name)
void parseInput(const DString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &root, ClangTUParser *clangParser) override
Parses a single input file with the goal to build an Entry tree.
~LexOutlineParser() override
std::unique_ptr< Private > p
const char * qPrint(const char *s)
static void parseMain(yyscan_t yyscanner, const DString &fileName, const char *fileBuf, const std::shared_ptr< Entry > &rt, ClangTUParser *clangParser)
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)