/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Portions Copyright 2011 Jens Elkner.
* Portions Copyright (c) 2017, 2020, Chris Fraire ");
}
@Override
public void startNewLine() throws IOException {
// *DO NOT CALL super method*
setLineNumber(++yyline);
if (didSeePhysicalLOC) {
++loc;
didSeePhysicalLOC = false;
}
}
// Q&D methods to assure well-formed documents
protected void closePara() throws IOException {
if (p > 0) {
out.write("
");
p++;
}
protected void openSpan(char cssClass) throws IOException {
out.write("");
span++;
}
protected void openDiv(String cssClass) throws IOException {
out.write("
"); startNewLine(); }
}
^\.(B|U|BI|BX|UL|LG|NL|SB|BR|RB) { chkLOC(); yybegin(BOLD); openSpan('b'); }
^\.(I|SM|IB|IR|RI|IX) { chkLOC(); yybegin(BOLD); openSpan('s'); }
^\.(CW) { chkLOC(); yybegin(BOLD); openSpan('k'); }
^\.(DS|LD|ID|BD|CD|RD) { chkLOC(); openSpan('k'); }
^\.DE { chkLOC(); closeSpan(); }
"); }
^".fi" { chkLOC(); cleanup(); out.write("
"); }
\\\*\(Tm { chkLOC(); out.write("TM "); }
\\\*\R { chkLOC(); out.write("® "); }
\\\((l|r)q { chkLOC(); out.write('"'); }
\\\(mi { chkLOC(); out.write('-'); }
^\.TS {
chkLOC();
cleanup();
yybegin(TBL);
out.write("
");
}
{EOL} { cleanup(); out.write("");
}
"); }
^[\_\=] {EOL} { chkLOC(); startNewLine(); }
T[\{\}] { chkLOC(); }
^\.TE {
chkLOC(); yybegin(YYINITIAL); cleanup(); out.write(" "); startNewLine(); }
}
{FNameChar}+ "@" {FNameChar}+ "." {FNameChar}+
{
chkLOC();
writeEMailAddress(yytext());
}
{File} {
chkLOC();
String path = yytext();
out.write("");
out.write(path);
out.write("");}
{RelaxedMiddleFPath} {
chkLOC();
out.write(Util.breadcrumbPath(urlPrefix + QueryParameters.PATH_SEARCH_PARAM_EQ, yytext(), '/'));
}
\\&. { chkLOC(); out.write(yycharat(yylength() - 1)); }
\\- { chkLOC(); out.write('-'); }
"\\ " { out.write(' '); }
"<" { chkLOC(); out.write( "<"); }
">" { chkLOC(); out.write( ">"); }
"&" { chkLOC(); out.write( "&"); }
{EOL} { out.write("\n"); startNewLine(); }
{WhspChar}+ { out.write(' '); }
[!-~] { chkLOC(); out.write(yytext()); }
[[\s]--[\n]] { Util.htmlize(yytext(), out); }
[^\n] { chkLOC(); Util.htmlize(yytext(), out); }