200 {TopStart} {
203 yyextra->lastContext = YY_START;
204 yyextra->startCCodeLine=yyextra->yyLineNr;
205 BEGIN (TopSection);
206 }
static void handleCCode(yyscan_t yyscanner)
207<DefSection>^{LiteralStart} {
210 yyextra->lastContext = YY_START;
211 yyextra->startCCodeLine=yyextra->yyLineNr;
212 BEGIN (LiteralSection);
213 }
214<TopSection>^{TopEnd} {
217 BEGIN( yyextra->lastContext ) ;
218 }
219<TopSection>.*{nl} {
220 yyextra->CCodeBuffer += yytext;
221 yyextra->yyLineNr++;
222 }
223<LiteralSection>^{LiteralEnd} {
226 BEGIN( yyextra->lastContext ) ;
227 }
228<LiteralSection>.*{nl} {
229 yyextra->CCodeBuffer += yytext;
230 yyextra->yyLineNr++;
231 }
232<DefSection>{CPPC}.*{nl} {
233 yyextra->CCodeBuffer += yytext;
234 yyextra->yyLineNr++;
235 }
236<DefSection>^{ws}*{CCS} {
237 yyextra->CCodeBuffer += yytext;
238 yyextra->lastContext = YY_START;
239 BEGIN(COMMENT);
240 }
241<COMMENT>{CCE}{ws}*{nl} {
242 yyextra->CCodeBuffer+=yytext;
243 yyextra->yyLineNr++;
245 BEGIN(yyextra->lastContext);
246 }
247<COMMENT>{CCE} {
248 yyextra->CCodeBuffer+=yytext;
250 BEGIN(yyextra->lastContext);
251 }
252<COMMENT>[^*\n]+ {
253 yyextra->CCodeBuffer += yytext;
254 }
255<COMMENT>{CPPC}|{CCS} {
256 yyextra->CCodeBuffer += yytext;
257 }
258<COMMENT>{nl} {
259 yyextra->CCodeBuffer += yytext;
260 yyextra->yyLineNr++;
261 }
262<COMMENT>. {
263 yyextra->CCodeBuffer += yytext;
264 }
265<DefSection>^{nl} {
268 yyextra->startCCodeLine=yyextra->yyLineNr;
269 }
270<DefSection>^{ws}.*{nl} {
271 yyextra->CCodeBuffer += yytext;
272 yyextra->yyLineNr++;
273 }
274<DefSection>^{RulesStart} {
277 yyextra->startCCodeLine=yyextra->yyLineNr;
278 BEGIN (RulesSectionInit);
279 }
280<DefSection>^{nws} {
283 BEGIN(DefSectionLine);
284 }
285<DefSectionLine>.*{nl} {
287 yyextra->startCCodeLine=yyextra->yyLineNr;
288 BEGIN(DefSection);
289 }
290<RulesSectionInit,RulesPattern>^{RulesEnd} {
293 yyextra->startCCodeLine=yyextra->yyLineNr;
294 BEGIN (UserSection);
295 }
296<RulesSectionInit>^{nws} {
298 unput(*yytext);
299 BEGIN(RulesPattern);
300 }
301<RulesSectionInit>{nl} {
302 yyextra->CCodeBuffer += yytext;
303 yyextra->yyLineNr++;
304 }
305<RulesSectionInit>^{ws}.*{nl} {
306 yyextra->CCodeBuffer += yytext;
307 yyextra->yyLineNr++;
308 }
309<RulesPattern>"<<EOF>>" {
310 yyextra->rulesPatternBuffer += yytext;
311 }
312<RulesPattern>{EscapeRulesChar} {
313 yyextra->rulesPatternBuffer += yytext;
314 }
315<RulesPattern>{RulesSharp} {
316 yyextra->rulesPatternBuffer += yytext;
317 }
318<RulesPattern>{RulesCurly} {
319 yyextra->rulesPatternBuffer += yytext;
320 }
321<RulesPattern>{StartDouble} {
322 yyextra->rulesPatternBuffer += yytext;
323 yyextra->lastContext = YY_START;
324 BEGIN(RulesDouble);
325 }
326<RulesDouble,RulesRoundDouble>"\\\\" {
327 yyextra->rulesPatternBuffer += yytext;
328 }
329<RulesDouble,RulesRoundDouble>"\\\"" {
330 yyextra->rulesPatternBuffer += yytext;
331 }
332<RulesDouble>"\"" {
333 yyextra->rulesPatternBuffer += yytext;
334 BEGIN( yyextra->lastContext ) ;
335 }
336<RulesRoundDouble>"\"" {
337 yyextra->rulesPatternBuffer += yytext;
338 BEGIN(RulesRound) ;
339 }
340<RulesDouble,RulesRoundDouble>. {
341 yyextra->rulesPatternBuffer += yytext;
342 }
343<RulesPattern>{StartSquare} {
344 yyextra->rulesPatternBuffer += yytext;
345 yyextra->lastContext = YY_START;
346 BEGIN(RulesSquare);
347 }
348<RulesSquare,RulesRoundSquare>{CHARCE} {
349 yyextra->rulesPatternBuffer += yytext;
350 }
351<RulesSquare,RulesRoundSquare>"\\[" |
352<RulesSquare,RulesRoundSquare>"\\]" {
353 yyextra->rulesPatternBuffer += yytext;
354 }
355<RulesSquare>"]" {
356 yyextra->rulesPatternBuffer += yytext;
357 BEGIN(RulesPattern) ;
358 }
359<RulesRoundSquare>"]" {
360 yyextra->rulesPatternBuffer += yytext;
361 BEGIN(RulesRound) ;
362 }
363<RulesSquare,RulesRoundSquare>"\\\\" {
364 yyextra->rulesPatternBuffer += yytext;
365 }
366<RulesSquare,RulesRoundSquare>. {
367 yyextra->rulesPatternBuffer += yytext;
368 }
369<RulesPattern>{StartRoundQuest} {
370 yyextra->rulesPatternBuffer += yytext;
371 yyextra->lastContext = YY_START;
372 BEGIN(RulesRoundQuest);
373 }
374<RulesRoundQuest>{nl} {
375 yyextra->rulesPatternBuffer += yytext;
376 if (!yyextra->rulesPatternBuffer.empty())
377 {
379 codifyLines(yyscanner,yyextra->rulesPatternBuffer.data());
380 yyextra->rulesPatternBuffer.clear();
382 }
383 }
static void startFontClass(yyscan_t yyscanner, const char *s)
384<RulesRoundQuest>[^)] {
385 yyextra->rulesPatternBuffer += yytext;
386 }
387<RulesRoundQuest>")" {
388 yyextra->rulesPatternBuffer += yytext;
389 BEGIN(yyextra->lastContext);
390 }
391<RulesPattern>{StartRound} {
392 yyextra->roundCount++;
393 yyextra->rulesPatternBuffer += yytext;
394 yyextra->lastContext = YY_START;
395 BEGIN(RulesRound);
396 }
397<RulesRound>{RulesCurly} {
398 yyextra->rulesPatternBuffer += yytext;
399 }
400<RulesRound>{StartSquare} {
401 yyextra->rulesPatternBuffer += yytext;
402 BEGIN(RulesRoundSquare);
403 }
404<RulesRound>{StartDouble} {
405 yyextra->rulesPatternBuffer += yytext;
406 BEGIN(RulesRoundDouble);
407 }
408<RulesRound>{EscapeRulesChar} {
409 yyextra->rulesPatternBuffer += yytext;
410 }
411<RulesRound>"(" {
412 yyextra->roundCount++;
413 yyextra->rulesPatternBuffer += yytext;
414 }
415<RulesRound>")" {
416 yyextra->roundCount--;
417 yyextra->rulesPatternBuffer += yytext;
418 if (!yyextra->roundCount) BEGIN( yyextra->lastContext ) ;
419 }
420<RulesRound>{nl} {
421 yyextra->rulesPatternBuffer += yytext;
422 yyextra->yyLineNr++;
423 }
424<RulesRound>{ws} {
425 yyextra->rulesPatternBuffer += yytext;
426 }
427<RulesRound>. {
428 yyextra->rulesPatternBuffer += yytext;
429 }
430<RulesPattern>{ws}+"|" {
431 if (!yyextra->rulesPatternBuffer.empty())
432 {
434 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
435 yyextra->rulesPatternBuffer.clear();
437 }
439 yyextra->startCCodeLine=yyextra->yyLineNr;
440 yyextra->curlyCount = 0;
441 BEGIN(SkipCurly);
442 }
443<RulesPattern>^{ws}*{nl} {
445 }
446<RulesPattern>^{ws}+ {
448 }
449<RulesPattern>({ws}|{nl}) {
450 unput(*yytext);
451 if (!yyextra->rulesPatternBuffer.empty())
452 {
454 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
455 yyextra->rulesPatternBuffer.clear();
457 }
458 yyextra->startCCodeLine=yyextra->yyLineNr;
459 yyextra->curlyCount = 0;
460 BEGIN(SkipCurly);
461 }
462<RulesPattern>"\\\\" {
463 yyextra->rulesPatternBuffer += yytext;
464 }
465<RulesPattern>{CCS} {
466 if (!yyextra->rulesPatternBuffer.empty())
467 {
469 codifyLines(yyscanner,yyextra->rulesPatternBuffer);
470 yyextra->rulesPatternBuffer.clear();
472 }
473 yyextra->CCodeBuffer += yytext;
474 yyextra->lastContext = YY_START;
475 BEGIN(COMMENT);
476 }
477<RulesPattern>. {
478 yyextra->rulesPatternBuffer += yytext;
479 }
480<SkipCurly>{B}*"#"{B}+[0-9]+{B}+/"\"" { /* line control directive */
481 yyextra->CCodeBuffer += yytext;
482 yyextra->lastPreLineCtrlContext = YY_START;
483 BEGIN( PreLineCtrl );
484 }
485<PreLineCtrl>"\""[^\n\"]*"\"" {
486 yyextra->CCodeBuffer += yytext;
487 }
488<PreLineCtrl>. {
489 yyextra->CCodeBuffer += yytext;
490 }
491<PreLineCtrl>\n {
492 yyextra->CCodeBuffer += yytext;
493 yyextra->yyLineNr++;
494 BEGIN( yyextra->lastPreLineCtrlContext );
495 }
496<SkipCurly>"{" {
497 yyextra->CCodeBuffer += yytext;
498 ++yyextra->curlyCount ;
499 }
500<SkipCurly>"}"/{BN}*{DCOMM}"<!--" | /* see bug710917 */
501<SkipCurly>"}" {
502 yyextra->CCodeBuffer += yytext;
504 if( yyextra->curlyCount )
505 {
506 --yyextra->curlyCount ;
507 }
508 }
#define lineCount(s, len)
509<SkipCurly>"}"{BN}*{DCOMM}"<" {
510 yyextra->CCodeBuffer += yytext;
512 if ( yyextra->curlyCount )
513 {
514 --yyextra->curlyCount ;
515 }
516 else
517 {
518 yyextra->docBlockContext = SkipCurlyEndDoc;
519 if (yytext[yyleng-3]=='/')
520 {
521 BEGIN( DocLine );
522 }
523 else
524 {
525 BEGIN( DocBlock );
526 }
527 }
528 }
529<SkipCurly>\" {
530 yyextra->CCodeBuffer += yytext;
531 yyextra->lastStringContext=SkipCurly;
532 BEGIN( SkipString );
533 }
534<SkipCurly>^{B}*"#" {
535 yyextra->CCodeBuffer += yytext;
536 yyextra->lastPreLineCtrlContext = YY_START;
537 BEGIN( PreLineCtrl );
538 }
539<SkipCurly>{B}*{RAWBEGIN} {
540 char *p = yytext;
543 yyextra->lastRawStringContext = YY_START;
544 yyextra->CCodeBuffer += yytext;
545 BEGIN(RawString);
546 }
DString extractBeginRawStringDelimiter(const char *rawStart)
547<SkipCurly>[^\n#"'@\\/{}<]+ {
548 yyextra->CCodeBuffer += yytext;
549 }
550<SkipCurly>{CCS} {
551 yyextra->CCodeBuffer += yytext;
552 yyextra->lastCContext = YY_START;
553 BEGIN(SkipComment);
554 }
555<SkipCurly>{CPPC} {
556 yyextra->CCodeBuffer += yytext;
557 yyextra->lastCContext = YY_START;
558 BEGIN(SkipCxxComment);
559 }
560<SkipCurly>{CHARLIT} {
561 yyextra->CCodeBuffer += yytext;
562 }
563<SkipCurly>\' {
564 yyextra->CCodeBuffer += yytext;
565 }
566<SkipCurly>. {
567 yyextra->CCodeBuffer += yytext;
568 }
569<SkipCurly>({CPPC}{B}*)?{CCS}"!" {
570 yyextra->CCodeBuffer += yytext;
571 yyextra->docBlockContext = YY_START;
572 BEGIN( DocBlock );
573 }
574<SkipCurly>{CCS}"*"[*]+{BL} {
576 yyextra->CCodeBuffer += yytext;
577 yyextra->yyLineNr++;
578 if( javadocBanner )
579 {
580 yyextra->docBlockContext = YY_START;
581 BEGIN( DocBlock );
582 }
583 else
584 {
585 BEGIN( Comment ) ;
586 }
587 }
#define Config_getBool(name)
588<SkipCurly>({CPPC}{B}*)?{CCS}"*"/{NCOMM} {
589 yyextra->CCodeBuffer += yytext;
590 yyextra->docBlockContext = YY_START;
591 BEGIN( DocBlock );
592 }
593<SkipCurly>{CPPC}"!" {
594 yyextra->CCodeBuffer += yytext;
595 yyextra->docBlockContext = YY_START;
596 BEGIN( DocLine );
597 }
598<SkipCurly>{CPPC}"/"/[^/] {
599 yyextra->CCodeBuffer += yytext;
600 yyextra->docBlockContext = YY_START;
601 BEGIN( DocLine );
602 }
603
604<SkipCurly>\n {
605 yyextra->CCodeBuffer += yytext;
606 yyextra->yyLineNr++;
607 if (yyextra->curlyCount<=0)
608 {
610 BEGIN(RulesPattern);
611 }
612 }
613<SkipString>\\. {
614 yyextra->CCodeBuffer += yytext;
615 }
616<SkipString>\" {
617 yyextra->CCodeBuffer += yytext;
618 BEGIN( yyextra->lastStringContext );
619 }
620<SkipString>{CCS}|{CCE}|{CPPC} {
621 yyextra->CCodeBuffer += yytext;
622 }
623<SkipString>\n {
624 yyextra->CCodeBuffer += yytext;
625 yyextra->yyLineNr++;
626 }
627<SkipString>. {
628 yyextra->CCodeBuffer += yytext;
629 }
630<SkipCxxComment>.*"\\\n" { // line continuation
631 yyextra->CCodeBuffer += yytext;
632 yyextra->yyLineNr++;
633 }
634<SkipCxxComment>{ANYopt}/\n {
635 yyextra->CCodeBuffer += yytext;
636 BEGIN( yyextra->lastCContext ) ;
637 }
638<Comment>{BN}+ {
639 yyextra->CCodeBuffer += yytext ;
641 }
642<Comment>{CCS} { yyextra->CCodeBuffer += yytext ; }
643<Comment>{CPPC} { yyextra->CCodeBuffer += yytext ; }
644<Comment>{CMD}("code"|"verbatim"|"iliteral") {
645 yyextra->insideCode=true;
646 yyextra->CCodeBuffer += yytext ;
647 }
648<Comment>{CMD}("endcode"|"endverbatim"|"endiliteral") {
649 yyextra->insideCode=false;
650 yyextra->CCodeBuffer += yytext ;
651 }
652<Comment>[^ \.\t\r\n\/\*]+ { yyextra->CCodeBuffer += yytext ; }
653<Comment>{CCE} {
654 yyextra->CCodeBuffer += yytext ;
655 if (!yyextra->insideCode) BEGIN( yyextra->lastContext ) ;
656 }
657<Comment>. { yyextra->CCodeBuffer += *yytext ; }
658
659<SkipComment>{CPPC}|{CCS} {
660 yyextra->CCodeBuffer += yytext;
661 }
662<SkipComment>[^\*\n]+ {
663 yyextra->CCodeBuffer += yytext;
664 }
665<SkipComment>\n {
666 yyextra->CCodeBuffer += yytext;
667 yyextra->yyLineNr++;
668 }
669<SkipComment>{B}*{CCE} {
670 yyextra->CCodeBuffer += yytext;
671 BEGIN( yyextra->lastCContext );
672 }
673<SkipComment>"*" {
674 yyextra->CCodeBuffer += yytext;
675 }
676<RawString>{RAWEND} {
677 yyextra->CCodeBuffer += yytext;
679 {
680 BEGIN(yyextra->lastRawStringContext);
681 }
682 }
DString extractEndRawStringDelimiter(const char *rawEnd)
683<RawString>[^)\n]+ {
684 yyextra->CCodeBuffer += yytext;
685 }
686<RawString>. {
687 yyextra->CCodeBuffer += yytext;
688 }
689<RawString>\n {
690 yyextra->CCodeBuffer += yytext;
691 yyextra->yyLineNr++;
692 }
693
694
695
696<DocLine>[^\n]*"\n"[ \t]*{CPPC}[/!][<]? { // continuation of multiline C++-style comment
697 yyextra->CCodeBuffer += yytext;
699 }
700<DocLine>{B}*{CPPC}"/"[/]+{Bopt}/"\n" { // ignore marker line (see bug700345)
701 yyextra->CCodeBuffer += yytext;
702 BEGIN( yyextra->docBlockContext );
703 }
704<DocLine>{NONLopt}/"\n"{B}*{CPPC}[!/]{B}*{CMD}"}" { // next line is an end group marker, see bug 752712
705 yyextra->CCodeBuffer += yytext;
706 BEGIN( yyextra->docBlockContext );
707 }
708<DocLine>{NONLopt}/"\n" { // whole line
709 yyextra->CCodeBuffer += yytext;
710 BEGIN( yyextra->docBlockContext );
711 }
712
713
714
715<DocBlock>"*"*{CCE} { // end of comment block
716 yyextra->CCodeBuffer += yytext;
717 BEGIN(yyextra->docBlockContext);
718 }
719<DocBlock>^{B}*"*"+/[^/] {
720 yyextra->CCodeBuffer += yytext;
721 }
722<DocBlock>^{B}*({CPPC})?{B}*"*"+/[^/a-z_A-Z0-9*] { // start of a comment line
723 yyextra->CCodeBuffer += yytext;
724 }
725<DocBlock>^{B}*({CPPC}){B}* { // strip embedded C++ comments if at the start of a line
726 yyextra->CCodeBuffer += yytext;
727 }
728<DocBlock>{CPPC} { // slashes in the middle of a comment block
729 yyextra->CCodeBuffer += yytext;
730 }
731<DocBlock>{CCS} { // start of a new comment in the
732
733 yyextra->CCodeBuffer += yytext;
734 }
735<DocBlock>({CMD}{CMD}){ID}/[^a-z_A-Z0-9] { // escaped command
736 yyextra->CCodeBuffer += yytext;
737 }
738<DocBlock>{CMD}("f$"|"f["|"f{"|"f(") {
739 yyextra->CCodeBuffer += yytext;
740 yyextra->docBlockName=&yytext[1];
741 if (yyextra->docBlockName.at(1)=='[')
742 {
743 yyextra->docBlockName.at(1)=']';
744 }
745 if (yyextra->docBlockName.at(1)=='{')
746 {
747 yyextra->docBlockName.at(1)='}';
748 }
749 if (yyextra->docBlockName.at(1)=='(')
750 {
751 yyextra->docBlockName.at(1)=')';
752 }
753 yyextra->fencedSize=0;
754 yyextra->nestedComment=false;
755 BEGIN(DocCopyBlock);
756 }
757<DocBlock>{B}*"<"{PRE}">" {
758 yyextra->CCodeBuffer += yytext;
759 yyextra->docBlockName="<pre>";
760 yyextra->fencedSize=0;
761 yyextra->nestedComment=false;
762 BEGIN(DocCopyBlock);
763 }
764<DocBlock>{CMD}"startuml"/[^a-z_A-Z0-9\-] { // verbatim type command (which could contain nested comments!)
765 yyextra->CCodeBuffer += yytext;
766 yyextra->docBlockName="uml";
767 yyextra->fencedSize=0;
768 yyextra->nestedComment=false;
769 BEGIN(DocCopyBlock);
770 }
771<DocBlock>{CMD}("verbatim"|"iliteral"|"latexonly"|"htmlonly"|"xmlonly"|"manonly"|"rtfonly"|"docbookonly"|"dot"|"msc"|"mermaid"|"code")/[^a-z_A-Z0-9\-] { // verbatim command (which could contain nested comments!)
772 yyextra->CCodeBuffer += yytext;
773 yyextra->docBlockName=&yytext[1];
774 yyextra->fencedSize=0;
775 yyextra->nestedComment=false;
776 BEGIN(DocCopyBlock);
777 }
778<DocBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
779 yyextra->CCodeBuffer += yytext;
781 yyextra->docBlockName="~~~";
783 yyextra->nestedComment=false;
784 BEGIN(DocCopyBlock);
785 }
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
786<DocBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
787 yyextra->CCodeBuffer += yytext;
789 yyextra->docBlockName="```";
791 yyextra->nestedComment=false;
792 BEGIN(DocCopyBlock);
793 }
794<DocBlock>{B}*"<code>" {
795 REJECT;
796 }
797<DocBlock>[^@*~\/\\\n]+ { // any character that isn't special
798 yyextra->CCodeBuffer += yytext;
799 }
800<DocBlock>\n { // newline
801 yyextra->CCodeBuffer += yytext;
803 }
804<DocBlock>. { // command block
805 yyextra->CCodeBuffer += yytext;
806 }
807
808
809<DocCopyBlock>"</"{PRE}">" { // end of a <pre> block
810 yyextra->CCodeBuffer += yytext;
811 if (yyextra->docBlockName=="<pre>")
812 {
813 BEGIN(DocBlock);
814 }
815 }
816<DocCopyBlock>"</"{CODE}">" { // end of a <code> block
817 yyextra->CCodeBuffer += yytext;
818 if (yyextra->docBlockName=="<code>")
819 {
820 BEGIN(DocBlock);
821 }
822 }
823<DocCopyBlock>{CMD}("f$"|"f]"|"f}"|"f)") {
824 yyextra->CCodeBuffer += yytext;
825 if (yyextra->docBlockName==&yytext[1])
826 {
827 BEGIN(DocBlock);
828 }
829 }
830<DocCopyBlock>{CMD}("endverbatim"|"endiliteral"|"endlatexonly"|"endhtmlonly"|"endxmlonly"|"enddocbookonly"|"endmanonly"|"endrtfonly"|"enddot"|"endmsc"|"endmermaid"|"enduml"|"endcode")/[^a-z_A-Z0-9] { // end of verbatim block
831 yyextra->CCodeBuffer += yytext;
832 if (&yytext[4]==yyextra->docBlockName)
833 {
834 BEGIN(DocBlock);
835 }
836 }
837<DocCopyBlock>^{B}*"*"+/{BN}+ { // start of a comment line
838 yyextra->CCodeBuffer += yytext;
839 if ((yyextra->docBlockName=="verbatim") || (yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
840 {
841 REJECT;
842 }
843 else
844 {
845 yyextra->CCodeBuffer += yytext;
846 }
847 }
848<DocCopyBlock>^{B}*"*"+/{B}+"*"{BN}* { // start of a comment line with two *'s
849 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
850 {
851 yyextra->CCodeBuffer += yytext;
852 }
853 else
854 {
855 REJECT;
856 }
857 }
858<DocCopyBlock>^{B}*"*"+/({ID}|"(") { // Assume *var or *(... is part of source code (see bug723516)
859 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
860 {
861 yyextra->CCodeBuffer += yytext;
862 }
863 else
864 {
865 REJECT;
866 }
867 }
868<DocCopyBlock>^{B}*"*"+/{BN}* { // start of a comment line with one *
869 if ((yyextra->docBlockName=="code") || (yyextra->docBlockName=="iliteral"))
870 {
871 if (yyextra->nestedComment)
872 {
873 yyextra->CCodeBuffer += yytext;
874 }
875 else
876 {
877 yyextra->CCodeBuffer += yytext;
878 }
879 }
880 else
881 {
882 REJECT;
883 }
884 }
885<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"~~~"[~]* {
886 yyextra->CCodeBuffer += yytext;
889 {
890 BEGIN(DocBlock);
891 }
892 }
893<DocCopyBlock>^({B}*"*"+)?{B}{0,3}"```"[`]* {
894 yyextra->CCodeBuffer += yytext;
897 {
898 BEGIN(DocBlock);
899 }
900 }
901<DocCopyBlock>[^<@/\*\]~\$\\\n]+ { // any character that is not special
902 yyextra->CCodeBuffer += yytext;
903 }
904<DocCopyBlock>{CCS}|{CCE}|{CPPC} {
905 if (yytext[1]=='*')
906 {
907 yyextra->nestedComment=true;
908 }
909 else if (yytext[0]=='*')
910 {
911 yyextra->nestedComment=false;
912 }
913 yyextra->CCodeBuffer += yytext;
914 }
915<DocCopyBlock>\n { // newline
916 yyextra->CCodeBuffer += yytext;
918 }
919<DocCopyBlock>. { // any other character
920 yyextra->CCodeBuffer += yytext;
921 }
922<SkipCurlyEndDoc>"}"{BN}*{DCOMM}"<" { // desc is followed by another one
923 yyextra->docBlockContext = SkipCurlyEndDoc;
924 yyextra->CCodeBuffer += yytext;
925 if (yytext[yyleng-3]=='/')
926 {
927 BEGIN( DocLine );
928 }
929 else
930 {
931 BEGIN( DocBlock );
932 }
933 }
934<SkipCurlyEndDoc>"}" {
935 yyextra->CCodeBuffer += yytext;
936 BEGIN(SkipCurly);
937 }
938
939<UserSection>.*{nl} {
940 yyextra->CCodeBuffer += yytext;
941 yyextra->yyLineNr++;
942 }
943
944<*>. { fprintf(stderr,"Lex code scanner Def rule for %s: #%s#\n",stateToString(YY_START),yytext);}
945<*>{nl} { fprintf(stderr,"Lex code scanner Def rule for newline %s: #%s#\n",stateToString(YY_START),yytext); yyextra->yyLineNr++;}
946 */
947<*><<EOF>> {
950 }
951%%