doxygen2HTML ::=
#ignore(C++/Doxygen)
#continue
[title]?
[body]?
#empty;
title ::=
"//!"
=> {@
@}
line(theContext)
=> {@
@}
;
body ::= "/*!" #continue [line(theContext)]* "*/";
line(theContext : node) : #!ignore ::=
![#ignore(blanks) "*/"]
[#ignore(blanks) '*']?
[
!![['\r']? '\n' | "*/"]
=> if !theContext.is_verbatim {
while !theContext.bullet_shift.empty() {
@@endl()@@endl()@@
removeLastElement(theContext.bullet_shift);
}
@@
}
|
=> local iBlanks = 0;
[
[
' ' => increment(iBlanks);
|
'\t' => set iBlanks = $iBlanks + 4$;
]
]*
'-'
=> {
if theContext.bullet_shift.empty() || $theContext.bullet_shift#back < iBlanks$ {
pushItem theContext.bullet_shift = iBlanks;
@@endl()@- @
} else if $theContext.bullet_shift#back > iBlanks$ {
do {
@
@endl()@
@endl()@@
removeLastElement(theContext.bullet_shift);
} while $theContext.bullet_shift#back > iBlanks$;
@@
} else if $theContext.bullet_shift#back == iBlanks$ {
@@endl()@@
}
}
]?
[
#check(!theContext.is_verbatim)
[
"\\" #readIdentifier:"code"
=>{
@
@endl()@@
insert theContext.is_verbatim = true;
}
|
'<' #readIdentifier:sTag '>'
=> {
@<@sTag@>@
if sTag == "tt" || sTag == "kbd" insert theContext.is_truetype = true;
}
|
'<' '/' #readIdentifier:sTag '>'
=> {@@sTag@>@}
]
|
#check(theContext.is_truetype || theContext.is_verbatim)
[
' ' => {@ @}
|
'\t' => {@ @}
]
|
#check(theContext.is_verbatim)
[
"\\" #readIdentifier:"endcode"
=>{
@
@endl()@@
insert theContext.is_verbatim = false;
}
]
|
~[['\r']? '\n' | "*/"]:cChar
=> {@@composeHTMLLikeString(cChar)@@}
]*
[
['\r']? '\n'
=> {
if theContext.is_verbatim {@
@}
@@endl()@@
}
]?
;