Bug fixes in conjunction with the new test suite on ../format/test.tex .

This commit is contained in:
Lutz Kettner 1997-05-09 17:25:55 +00:00
parent 7e2a98a6a9
commit e8f173cde0
4 changed files with 145 additions and 82 deletions

View File

@ -75,7 +75,8 @@ Switch noheader_switch = NO_SWITCH;
Switch onlyheader_switch = NO_SWITCH; Switch onlyheader_switch = NO_SWITCH;
char* cgal_lib_dir = NULL; char* cgal_lib_dir = NULL;
char* pre_main_filename = NULL;
ostream* pre_stream = NULL;
/* An object storing the current font */ /* An object storing the current font */
/* ================================== */ /* ================================== */
@ -823,7 +824,10 @@ void filter_config_file( istream& in, ostream& out) {
break; break;
case 'u': case 'u':
if ( main_stream != &cout) if ( main_stream != &cout)
if ( main_stream != pre_stream)
out << main_filename; out << main_filename;
else
out << pre_main_filename;
break; break;
case 'd': case 'd':
if ( manual_date ) if ( manual_date )
@ -992,6 +996,8 @@ const char* html_multi_character( char c) {
} }
void print_ascii_to_html( ostream& out, const char* txt) { void print_ascii_to_html( ostream& out, const char* txt) {
if (txt == NULL)
return;
while( *txt) { while( *txt) {
if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') { if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') {
out << new_remember_font( txt[1]); out << new_remember_font( txt[1]);
@ -1005,6 +1011,8 @@ void print_ascii_to_html( ostream& out, const char* txt) {
} }
void print_ascii_len_to_html( ostream& out, const char* txt, int n) { void print_ascii_len_to_html( ostream& out, const char* txt, int n) {
if (txt == NULL)
return;
while( n) { while( n) {
if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') { if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') {
out << new_remember_font( txt[1]); out << new_remember_font( txt[1]);
@ -1020,6 +1028,8 @@ void print_ascii_len_to_html( ostream& out, const char* txt, int n) {
// This version eliminates multiple spaces. // This version eliminates multiple spaces.
void print_ascii_to_html_spc( ostream& out, const char* txt) { void print_ascii_to_html_spc( ostream& out, const char* txt) {
if (txt == NULL)
return;
while( *txt) { while( *txt) {
if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') { if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') {
out << new_remember_font( txt[1]); out << new_remember_font( txt[1]);
@ -1034,6 +1044,8 @@ void print_ascii_to_html_spc( ostream& out, const char* txt) {
} }
int strlen_ascii_to_html( const char* txt) { int strlen_ascii_to_html( const char* txt) {
if (txt == NULL)
return 0;
int len = 0; int len = 0;
while( *txt) { while( *txt) {
if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') { if ( *txt == '\\' && isupper(txt[1]) && txt[2] == '\\') {
@ -1087,9 +1099,9 @@ char* convert_C_to_html( const char* txt) {
return formatted; return formatted;
} }
// A scope operator is also appended // No longer is a scope operator appended.
char* convert_ascii_to_scrambled_html( const char* txt) { char* convert_ascii_to_scrambled_html( const char* txt) {
char* s = new char[ strlen_ascii_to_html( txt) + 3 char* s = new char[ strlen_ascii_to_html( txt) + 1
+ strlen( index_scramble)]; + strlen( index_scramble)];
char* p = s; char* p = s;
bool tag = true; bool tag = true;
@ -1113,19 +1125,19 @@ char* convert_ascii_to_scrambled_html( const char* txt) {
tag = false; tag = false;
} }
} }
*p++ = ':';
*p++ = ':';
*p = '\0'; *p = '\0';
return s; return s;
} }
char* convert_C_to_scrambled_html( const char* txt) { // A scope operator is also appended.
char* convert_C_to_scrambled_scope_html( const char* txt) {
current_font = it_font; current_font = it_font;
char* tmp = convert_ascii_to_scrambled_html( txt); char* tmp = convert_ascii_to_scrambled_html( txt);
const char* end_font = new_font_tags( it_font); const char* end_font = new_font_tags( it_font);
char* formatted = new char[ strlen( tmp) + strlen( end_font) + 8]; char* formatted = new char[ strlen( tmp) + strlen( end_font) + 10];
strcpy( formatted, "<I>"); strcpy( formatted, "<I>");
strcat( formatted, tmp); strcat( formatted, tmp);
strcat( formatted, "::");
strcat( formatted, end_font); strcat( formatted, end_font);
strcat( formatted, "</I>"); strcat( formatted, "</I>");
delete[] tmp; delete[] tmp;
@ -2126,6 +2138,10 @@ void format_function( bool method, const char* signature, const Text& T) {
if ( conversion_operator) { if ( conversion_operator) {
print_ascii_to_html_spc( *current_stream, op_symbols); print_ascii_to_html_spc( *current_stream, op_symbols);
*current_stream << " ( "; *current_stream << " ( ";
if ( creationvariable == NULL) {
printErrorMessage( VariableUsedError);
*current_stream << "*this";
} else
print_ascii_to_html_spc( *current_stream, creationvariable); print_ascii_to_html_spc( *current_stream, creationvariable);
*current_stream << ")"; *current_stream << ")";
} else { } else {
@ -2138,7 +2154,11 @@ void format_function( bool method, const char* signature, const Text& T) {
*current_stream << get_remember_font() << indNewline; *current_stream << get_remember_font() << indNewline;
} }
if ( method) { if ( method) {
print_ascii_to_html_spc( *current_stream, creationvariable); if ( creationvariable == NULL) {
printErrorMessage( VariableUsedError);
*current_stream << "*this";
} else
print_ascii_to_html_spc(*current_stream, creationvariable);
*current_stream << '.'; *current_stream << '.';
} }
if ( scope) if ( scope)
@ -2217,14 +2237,12 @@ void format_variable( const char* signature,
// generate a substitution rule for hyperlinking // generate a substitution rule for hyperlinking
*anchor_stream << "[a-zA-Z0-9_]\"" << formatted_var *anchor_stream << "[a-zA-Z0-9_]\"" << formatted_var
<< "\" { ECHO; }" << endl; << "\" { ECHO; }" << endl;
*anchor_stream << "\"" << formatted_var
<< "\"[a-zA-Z0-9_] { ECHO; }" << endl;
*anchor_stream << '"' << formatted_var *anchor_stream << '"' << formatted_var
<< "\" { fputs( \"<A HREF=\\\"" << "\"/{noCCchar} { fputs( \"<A HREF=\\\""
<< current_filename << current_filename
<< (is_typedef ? "#Typedef_" : "#Var_" ) << (is_typedef ? "#Typedef_" : "#Var_" );
<< variable_name filter_for_index_anchor( *anchor_stream, variable_name);
<< "\\\">" << formatted_var << "</A>\", stdout); }" *anchor_stream << "\\\">" << formatted_var << "</A>\", stdout); }"
<< endl; << endl;
// index // index
@ -2243,15 +2261,16 @@ void format_variable( const char* signature,
filter_for_index_comment( *index_stream, variable_name); filter_for_index_comment( *index_stream, variable_name);
*index_stream << "!><UL><LI><A HREF=\"" *index_stream << "!><UL><LI><A HREF=\""
<< current_filename << current_filename
<< (is_typedef ? "#Typedef_" : "#Var_" ) << (is_typedef ? "#Typedef_" : "#Var_" );
<< variable_name filter_for_index_anchor( *index_stream, variable_name);
<< "\"><I>" << scrambled_template_class_name *index_stream << "\"><I>" << scrambled_template_class_name
<< scrambled_var << "</I></A></UL>" << endl; << scrambled_var << "</I></A></UL>" << endl;
delete[] scrambled_var; delete[] scrambled_var;
} }
*current_stream << "<A NAME=\"" *current_stream << "<A NAME=\""
<< (is_typedef ? "Typedef_" : "Var_" ) << (is_typedef ? "Typedef_" : "Var_" );
<< variable_name << "\"></A>" << endl; filter_for_index_anchor( *current_stream, variable_name);
*current_stream << "\"></A>" << endl;
// end index // end index
if ( return_value) if ( return_value)
@ -2442,12 +2461,11 @@ void format_enum( const char* signature, const Text& T) {
// generate a substitution rule for hyperlinking // generate a substitution rule for hyperlinking
*anchor_stream << "[a-zA-Z0-9_]\"" << formatted_enum *anchor_stream << "[a-zA-Z0-9_]\"" << formatted_enum
<< "\" { ECHO; }" << endl; << "\" { ECHO; }" << endl;
*anchor_stream << "\"" << formatted_enum
<< "\"[a-zA-Z0-9_] { ECHO; }" << endl;
*anchor_stream << '"' << formatted_enum *anchor_stream << '"' << formatted_enum
<< "\" { fputs( \"<A HREF=\\\"" << "\"/{noCCchar} { fputs( \"<A HREF=\\\""
<< current_filename << "#Enum_" << enum_name << "\\\">" << current_filename << "#Enum_";
<< formatted_enum << "</A>\", stdout); }" filter_for_index_anchor( *anchor_stream, enum_name);
*anchor_stream << "\\\">" << formatted_enum << "</A>\", stdout); }"
<< endl; << endl;
// index // index
@ -2463,12 +2481,15 @@ void format_enum( const char* signature, const Text& T) {
*index_stream << "::"; *index_stream << "::";
filter_for_index_comment( *index_stream, enum_name); filter_for_index_comment( *index_stream, enum_name);
*index_stream << "!><UL><LI><A HREF=\"" *index_stream << "!><UL><LI><A HREF=\""
<< current_filename << "#Enum_" << enum_name << current_filename << "#Enum_";
<< "\"><I>" << scrambled_template_class_name filter_for_index_anchor( *index_stream, enum_name);
*index_stream << "\"><I>" << scrambled_template_class_name
<< scrambled_enum << "</I></A></UL>" << endl; << scrambled_enum << "</I></A></UL>" << endl;
delete[] scrambled_enum; delete[] scrambled_enum;
} }
*current_stream << "<A NAME=\"Enum_" << enum_name << "\"></A>" << endl; *current_stream << "<A NAME=\"Enum_";
filter_for_index_anchor( *current_stream, enum_name);
*current_stream << "\"></A>" << endl;
// end index // end index
// first, estimate size // first, estimate size
@ -2538,12 +2559,11 @@ void format_enum( const char* signature, const Text& T) {
char *tmp_param = convert_ascii_to_html( p); char *tmp_param = convert_ascii_to_html( p);
*anchor_stream << "[a-zA-Z0-9_]\"" << tmp_param *anchor_stream << "[a-zA-Z0-9_]\"" << tmp_param
<< "\" { ECHO; }" << endl; << "\" { ECHO; }" << endl;
*anchor_stream << "\"" << tmp_param
<< "\"[a-zA-Z0-9_] { ECHO; }" << endl;
*anchor_stream << '"' << tmp_param *anchor_stream << '"' << tmp_param
<< "\" { fputs( \"<A HREF=\\\"" << "\"/{noCCchar} { fputs( \"<A HREF=\\\""
<< current_filename << "#Enum_" << current_filename << "#Enum_";
<< enum_name << "\\\">" filter_for_index_anchor( *anchor_stream, enum_name);
*anchor_stream << "\\\">"
<< tmp_param << "</A>\", stdout); }" << tmp_param << "</A>\", stdout); }"
<< endl; << endl;
delete[] tmp_param; delete[] tmp_param;
@ -2561,8 +2581,9 @@ void format_enum( const char* signature, const Text& T) {
*index_stream << "::"; *index_stream << "::";
filter_for_index_comment( *index_stream, p); filter_for_index_comment( *index_stream, p);
*index_stream << "!><UL><LI><A HREF=\"" *index_stream << "!><UL><LI><A HREF=\""
<< current_filename << "#Enum_" << enum_name << current_filename << "#Enum_";
<< "\"><I>" << scrambled_template_class_name filter_for_index_anchor( *index_stream, enum_name);
*index_stream << "\"><I>" << scrambled_template_class_name
<< scrambled_tag << "</I></A></UL>" << endl; << scrambled_tag << "</I></A></UL>" << endl;
delete[] scrambled_tag; delete[] scrambled_tag;
} }
@ -2618,12 +2639,11 @@ void format_struct( const char* signature, const Text& T) {
// generate a substitution rule for hyperlinking // generate a substitution rule for hyperlinking
*anchor_stream << "[a-zA-Z0-9_]\"" << formatted_struct *anchor_stream << "[a-zA-Z0-9_]\"" << formatted_struct
<< "\" { ECHO; }" << endl; << "\" { ECHO; }" << endl;
*anchor_stream << "\"" << formatted_struct
<< "\"[a-zA-Z0-9_] { ECHO; }" << endl;
*anchor_stream << '"' << formatted_struct *anchor_stream << '"' << formatted_struct
<< "\" { fputs( \"<A HREF=\\\"" << "\"/{noCCchar} { fputs( \"<A HREF=\\\""
<< current_filename << "#Struct_" << struct_name << current_filename << "#Struct_";
<< "\\\">" << formatted_struct << "</A>\", stdout); }" filter_for_index_anchor( *anchor_stream, struct_name);
*anchor_stream << "\\\">" << formatted_struct << "</A>\", stdout); }"
<< endl; << endl;
// index // index
*index_stream << sort_key_struct << '1'; *index_stream << sort_key_struct << '1';
@ -2638,12 +2658,15 @@ void format_struct( const char* signature, const Text& T) {
*index_stream << "::"; *index_stream << "::";
filter_for_index_comment( *index_stream, struct_name); filter_for_index_comment( *index_stream, struct_name);
*index_stream << "!><UL><LI><A HREF=\"" *index_stream << "!><UL><LI><A HREF=\""
<< current_filename << "#Struct_" << struct_name << current_filename << "#Struct_";
<< "\"><I>" << scrambled_template_class_name filter_for_index_anchor( *index_stream, struct_name);
*index_stream << "\"><I>" << scrambled_template_class_name
<< scrambled_struct << "</I></A></UL>" << endl; << scrambled_struct << "</I></A></UL>" << endl;
delete[] scrambled_struct; delete[] scrambled_struct;
} }
*current_stream << "<A NAME=\"Struct_" << struct_name << "\"></A>" << endl; *current_stream << "<A NAME=\"Struct_";
filter_for_index_anchor( *current_stream, struct_name);
*current_stream << "\"></A>" << endl;
// end index // end index
// first, estimate size // first, estimate size
@ -2769,7 +2792,7 @@ void handleChapter( const Text& T) {
chapter_title = text_block_to_string( T); chapter_title = text_block_to_string( T);
footnotes = &main_footnotes; footnotes = &main_footnotes;
footnote_counter = &main_footnote_counter; footnote_counter = &main_footnote_counter;
if ( main_stream != &cout) { if ( main_stream != &cout && main_stream != pre_stream) {
printFootnotes( *main_stream); printFootnotes( *main_stream);
// navigation footer // navigation footer
*main_stream << "<HR> Next chapter: <A HREF=\"" *main_stream << "<HR> Next chapter: <A HREF=\""
@ -3032,24 +3055,30 @@ const char* handleHtmlCrossLink( const char* key, bool tmpl_class) {
char *tmp_name = convert_ascii_to_html( key); char *tmp_name = convert_ascii_to_html( key);
*anchor_stream << "[a-zA-Z0-9_]\"" << tmp_name *anchor_stream << "[a-zA-Z0-9_]\"" << tmp_name
<< "\" { ECHO; }" << endl; << "\" { ECHO; }" << endl;
*anchor_stream << "\"" << tmp_name
<< "\"[a-zA-Z0-9_] { ECHO; }" << endl;
*anchor_stream << '"' << tmp_name *anchor_stream << '"' << tmp_name
<< "\" { fputs( \"<A HREF=\\\"" << "\"/{noCCchar} { fputs( \"<A HREF=\\\""
<< current_filename << "#Cross_link_anchor_" << current_filename << "#Cross_link_anchor_"
<< cross_link_anchor_counter << "\\\">" << cross_link_anchor_counter << "\\\">"
<< tmp_name << "</A>\", stdout); }" << tmp_name << "</A>\", stdout); }"
<< endl; << endl;
if ( tmpl_class) { if ( tmpl_class) {
*anchor_stream << '"' << tmp_name *anchor_stream << '"' << tmp_name
<< "\"[ ]*\"&lt;\" {\n" << "\"{ws}\"&lt;\"{ws}{CCidfier}{ws}\"&gt;\" {\n"
<< " fputs( \"<A HREF=\\\"" << " fputs( \"<A HREF=\\\""
<< current_filename << "#Cross_link_anchor_" << current_filename << "#Cross_link_anchor_"
<< cross_link_anchor_counter << "\\\">\", stdout);\n" << cross_link_anchor_counter << "\\\">\", stdout);\n"
<< " nesting = 1;\n" << " ECHO;\n"
<< " yymore();\n" << " fputs( \"</A>\", stdout); }\n"
<< " BEGIN( PARAMMODE); }\n"
<< endl; << endl;
// *anchor_stream << '"' << tmp_name
// << "\"[ ]*\"&lt;\" {\n"
// << " fputs( \"<A HREF=\\\""
// << current_filename << "#Cross_link_anchor_"
// << cross_link_anchor_counter << "\\\">\", stdout);\n"
// << " nesting = 1;\n"
// << " yymore();\n"
// << " BEGIN( PARAMMODE); }\n"
// << endl;
} }
delete[] tmp_name; delete[] tmp_name;
@ -3069,7 +3098,7 @@ void handleClasses( const char* classname, const char* template_cls) {
formatted_template_class_name = formatted_template_class_name =
convert_C_to_html( template_class_name); convert_C_to_html( template_class_name);
scrambled_template_class_name = scrambled_template_class_name =
convert_C_to_scrambled_html( template_class_name); convert_C_to_scrambled_scope_html( template_class_name);
class_name = newstr( classname); class_name = newstr( classname);
creationvariable = newstr( "*this"); creationvariable = newstr( "*this");
formatted_creationvariable = newstr( "<I>*this</I>"); formatted_creationvariable = newstr( "<I>*this</I>");
@ -3352,6 +3381,16 @@ main( int argc, char **argv) {
nParameters = ErrParameters; nParameters = ErrParameters;
} }
endDetect(); endDetect();
detectSwitch( dummy_switch, "main");
i++;
if ( i < argc) {
pre_main_filename = argv[i];
} else {
cerr << "error: option -main needs an additional parameter"
<< endl;
nParameters = ErrParameters;
}
endDetect();
detectSwitch( warn_switch, "warn"); detectSwitch( warn_switch, "warn");
endDetect(); endDetect();
detectSwitch( macro_switch, "macro"); detectSwitch( macro_switch, "macro");
@ -3399,6 +3438,8 @@ main( int argc, char **argv) {
"output files." << endl; "output files." << endl;
cerr << " -cgal_dir <dir/> set the path to the CGAL " cerr << " -cgal_dir <dir/> set the path to the CGAL "
"header files." << endl; "header files." << endl;
cerr << " -main <file> main filename for the part before"
" any chapter" << endl;
cerr << " -warn warn about unknown macros" << endl; cerr << " -warn warn about unknown macros" << endl;
cerr << " -macro trace macro definitions" << endl; cerr << " -macro trace macro definitions" << endl;
cerr << " -noheader no header for contents.html and " cerr << " -noheader no header for contents.html and "
@ -3446,6 +3487,13 @@ main( int argc, char **argv) {
if ( ! noheader_switch) if ( ! noheader_switch)
write_headers_to_index( *index_stream); write_headers_to_index( *index_stream);
if ( pre_main_filename) {
pre_stream = open_file_with_path_for_write(tmp_path,pre_main_filename);
current_stream = pre_stream;
current_filename = pre_main_filename;
open_html( *pre_stream);
}
for ( i = 0; i < nParameters; i++) { for ( i = 0; i < nParameters; i++) {
FILE* in; FILE* in;
if ( (in = fopen( parameters[i], "r")) == NULL) { if ( (in = fopen( parameters[i], "r")) == NULL) {
@ -3456,9 +3504,16 @@ main( int argc, char **argv) {
} }
in_filename = parameters[i]; in_filename = parameters[i];
if ( pre_main_filename) {
main_stream = pre_stream;
main_filename = pre_main_filename;
current_stream = main_stream;
current_filename = pre_main_filename;
} else {
main_stream = &cout; main_stream = &cout;
current_stream = main_stream; current_stream = main_stream;
current_filename = main_filename; current_filename = main_filename;
}
init_scanner( in); init_scanner( in);
yyparse(); yyparse();
@ -3474,7 +3529,7 @@ main( int argc, char **argv) {
class_filename = 0; class_filename = 0;
} }
assert_file_write( *main_stream, main_filename); assert_file_write( *main_stream, main_filename);
if ( main_stream != &cout) { if ( main_stream != &cout && main_stream != pre_stream) {
footnotes = &main_footnotes; footnotes = &main_footnotes;
footnote_counter = &main_footnote_counter; footnote_counter = &main_footnote_counter;
printFootnotes( *main_stream); printFootnotes( *main_stream);
@ -3487,6 +3542,13 @@ main( int argc, char **argv) {
} }
} }
if ( pre_main_filename) {
printFootnotes( *pre_stream);
close_html( *pre_stream);
assert_file_write( *pre_stream, pre_main_filename);
delete pre_stream;
}
assert_file_write( *index_stream, index_filename); assert_file_write( *index_stream, index_filename);
delete index_stream; delete index_stream;

View File

@ -274,8 +274,8 @@ set options = "${cgal_dir} -config ${config_path}/ -tmp ${new_tmp_path}/ ${aux_f
if ( $?DEBUG) echo "# Step 1: convert each LaTeX file into an HTML file." if ( $?DEBUG) echo "# Step 1: convert each LaTeX file into an HTML file."
if ($show_main_switch) then if ($show_main_switch) then
if ( $?DEBUG) echo "cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files}" if ( $?DEBUG) echo "cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} -main main.html ${in_files}"
cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files} cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} -main main.html ${in_files}
else else
if ( $?DEBUG) echo "cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files} >/dev/null" if ( $?DEBUG) echo "cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files} >/dev/null"
cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files} >/dev/null cc_extract_html -date "${DEFAULT_DATE}" -release "${DEFAULT_RELEASE}" -title "${DEFAULT_TITLE}" -author "${DEFAULT_AUTHOR}" ${options} ${in_files} >/dev/null
@ -491,7 +491,7 @@ echo "$0 "'$Revision$'" (c) Lutz Kettner"
echo "Usage: $0 [<options>] <tex-files...>" echo "Usage: $0 [<options>] <tex-files...>"
echo " -defaults show the settings of the internal variables." echo " -defaults show the settings of the internal variables."
echo " -extended extended organization among multiple dir's." echo " -extended extended organization among multiple dir's."
echo " -show_main show the translation result for the main file." echo " -show_main put the result for the main file in main.html."
echo " -date <text> set a date for the manual." echo " -date <text> set a date for the manual."
echo " -release <text> set a release number for the manual." echo " -release <text> set a release number for the manual."
echo " -title <text> set a title text for the manual." echo " -title <text> set a title text for the manual."

View File

@ -145,7 +145,7 @@ floatNumber ({signNumber}\.|{signNumber}\.{number})
expNumber ({floatNumber}|{signNumber}){exp}{signNumber} expNumber ({floatNumber}|{signNumber}){exp}{signNumber}
No ({signNumber}|{floatNumber}|{expNumber}) No ({signNumber}|{floatNumber}|{expNumber})
operator [^a-zA-Z_0-9\n\r\t \\] operator [^a-zA-Z_0-9\n\r\t \\]
measure {signNumber}{letter}{letter} measure (({signNumber})|({floatNumber})){letter}{letter}
rmblockintro ([\{][\\](rm))|([\\]((text)|(math))rm[\{]) rmblockintro ([\{][\\](rm))|([\\]((text)|(math))rm[\{])
ttblockintro ([\{][\\](tt))|([\\]((text)|(math))tt[\{]) ttblockintro ([\{][\\](tt))|([\\]((text)|(math))tt[\{])
emblockintro ([\{][\\](em))|([\\]emph[\{]) emblockintro ([\{][\\](em))|([\\]emph[\{])
@ -296,8 +296,8 @@ calblockintro ([\{][\\](cal))|([\\]mathcal[\{])
[\\]verb{noletter} { /* match LaTeX \verb"..." constructs */ [\\]verb{noletter} { /* match LaTeX \verb"..." constructs */
BEGIN( VerbMode); BEGIN( VerbMode);
stop_character = yytext[ yyleng-1]; stop_character = yytext[ yyleng-1];
yylval.string.text = "<PRE>"; yylval.string.text = "<TT>";
yylval.string.len = 5; yylval.string.len = 4;
return STRING; return STRING;
} }
<VerbMode>{ws} { <VerbMode>{ws} {
@ -308,8 +308,8 @@ calblockintro ([\{][\\](cal))|([\\]mathcal[\{])
<VerbMode>. { <VerbMode>. {
if ( yytext[0] == stop_character) { if ( yytext[0] == stop_character) {
BEGIN( INITIAL); BEGIN( INITIAL);
yylval.string.text = "</PRE>"; yylval.string.text = "</TT>";
yylval.string.len = 6; yylval.string.len = 5;
return STRING; return STRING;
} }
if ( yytext[0] == '\n') { if ( yytext[0] == '\n') {
@ -1413,15 +1413,16 @@ calblockintro ([\{][\\](cal))|([\\]mathcal[\{])
} }
<INITIAL,MMODE,NestingMode>{ttblockintro} { /* TeX styles like {\tt ... */ <INITIAL,MMODE,NestingMode>{ttblockintro} { /* TeX styles like {\tt ... */
skipspaces();
return TTBLOCKINTRO; return TTBLOCKINTRO;
} }
<INITIAL,MMODE,NestingMode>{emblockintro} { return EMBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{emblockintro} { skipspaces();return EMBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{itblockintro} { return ITBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{itblockintro} { skipspaces();return ITBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{scblockintro} { return SCBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{scblockintro} { skipspaces();return SCBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{bfblockintro} { return BFBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{bfblockintro} { skipspaces();return BFBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{rmblockintro} { return RMBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{rmblockintro} { skipspaces();return RMBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{sfblockintro} { return SFBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{sfblockintro} { skipspaces();return SFBLOCKINTRO;}
<INITIAL,MMODE,NestingMode>{calblockintro} { return CALBLOCKINTRO; } <INITIAL,MMODE,NestingMode>{calblockintro} {skipspaces();return CALBLOCKINTRO;}
<CCMode,ccStyleMode>[\\]tt/{noletter} { <CCMode,ccStyleMode>[\\]tt/{noletter} {
skipspaces(); skipspaces();

View File

@ -327,9 +327,9 @@ stmt: string { handleBuffer( * $1);
group: '{' group: '{'
input input
'}' '}'
| blockintro | blockintro { handleString( $1.text);}
input input
'}' {} '}' { handleString( $1.text + strlen( $1.text)+1);}
; ;
/* Auxiliary Rules */ /* Auxiliary Rules */