home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Usenet 1994 October
/
usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso
/
misc
/
volume44
/
c++2latex
/
part05
< prev
next >
Wrap
Internet Message Format
|
1994-08-07
|
61KB
From: joke@germany.eu.net (Joerg Heitkoetter)
Newsgroups: comp.sources.misc
Subject: v44i014: c++2latex - A set of LaTeX converters for the whole C family, v3.0, Part05/08
Date: 7 Aug 1994 16:43:13 -0500
Organization: Sterling Software
Sender: kent@sparky.sterling.com
Approved: kent@sparky.sterling.com
Message-ID: <323khh$gmk@sparky.sterling.com>
X-Md4-Signature: 3fb676ef526224c6ceffd9a1432eb362
Submitted-by: joke@germany.eu.net (Joerg Heitkoetter)
Posting-number: Volume 44, Issue 14
Archive-name: c++2latex/part05
Environment: UNIX, Flex, LaTeX, Sun
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# Contents: docs/sample.c src/c++2latex.c.B src/c++2latex.l
# src/objc2latex.c.B
# Wrapped by kent@sparky on Sun Aug 7 16:11:53 1994
PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin:$PATH ; export PATH
echo If this archive is complete, you will see the following message:
echo ' "shar: End of archive 5 (of 8)."'
if test -f 'docs/sample.c' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'docs/sample.c'\"
else
echo shar: Extracting \"'docs/sample.c'\" \(1714 characters\)
sed "s/^X//" >'docs/sample.c' <<'END_OF_FILE'
X//
X// Copyright (c) 1991-1994 University of Dortmund
X//
X// Permission to use, copy, modify, distribute, and sell this software and its
X// documentation for any purpose is hereby granted without fee, provided
X// that the above copyright notice appear in all copies and that both that
X// copyright notice and this permission notice appear in supporting
X// documentation, and that the name of UNIDO not be used in advertising or
X// publicity pertaining to distribution of the software without specific,
X// written prior permission. UNIDO makes no representations about
X// the suitability of this software for any purpose. It is provided "as is"
X// without express or implied warranty.
X//
X// UNIDO DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
X// INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS.
X// IN NO EVENT SHALL UNIDO BE LIABLE FOR ANY SPECIAL, INDIRECT OR
X// CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
X// FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
X// CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
X// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
X//
X
X/*
X * this is a comment
X */
X
X#include <stdio.h>
X
X#define FATAL(X) {printf(#X); exit(1);}
X#define TEMP (i) temp ## i
X
X/* NOARGS */
Xmain (argc, argv)
Xint argc;
Xchar **argv;
X{
X int a; // this is a variable
X int b; /* another variable */
X
X // busy doing nothing...
X int c;
X
X /* no more */
X int d;
X
X switch (something) {
X case THISCASE:
X something = 99; // who knows why?
X break;
X case default:
X somethingelse = 100; // completetly arbitrary
X break;
X } // end of switch
X
X for (i=0; i<j; i++) {
X } /* loop */
X
X return (0);
X} /* end of main */
END_OF_FILE
if test 1714 -ne `wc -c <'docs/sample.c'`; then
echo shar: \"'docs/sample.c'\" unpacked with wrong size!
fi
# end of 'docs/sample.c'
fi
if test -f 'src/c++2latex.c.B' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/c++2latex.c.B'\"
else
echo shar: Extracting \"'src/c++2latex.c.B'\" \(24230 characters\)
sed "s/^X//" >'src/c++2latex.c.B' <<'END_OF_FILE'
X# line 87 "src/c++2latex.l"
Xcase 62:
X# line 88 "src/c++2latex.l"
Xcase 63:
X# line 89 "src/c++2latex.l"
Xcase 64:
X# line 90 "src/c++2latex.l"
Xcase 65:
X# line 91 "src/c++2latex.l"
Xcase 66:
X# line 92 "src/c++2latex.l"
Xcase 67:
X# line 93 "src/c++2latex.l"
Xcase 68:
X# line 94 "src/c++2latex.l"
Xcase 69:
X# line 95 "src/c++2latex.l"
Xcase 70:
X# line 96 "src/c++2latex.l"
Xcase 71:
X# line 97 "src/c++2latex.l"
Xcase 72:
X# line 98 "src/c++2latex.l"
Xcase 73:
X# line 99 "src/c++2latex.l"
Xcase 74:
X# line 100 "src/c++2latex.l"
Xcase 75:
X# line 101 "src/c++2latex.l"
Xcase 76:
X# line 102 "src/c++2latex.l"
Xcase 77:
X# line 103 "src/c++2latex.l"
Xcase 78:
XYY_USER_ACTION
X# line 103 "src/c++2latex.l"
XKEY;
X YY_BREAK
Xcase 79:
XYY_USER_ACTION
X# line 106 "src/c++2latex.l"
XSYM ("rightarrow");
X YY_BREAK
Xcase 80:
XYY_USER_ACTION
X# line 107 "src/c++2latex.l"
XSYM ("ll");
X YY_BREAK
Xcase 81:
XYY_USER_ACTION
X# line 108 "src/c++2latex.l"
XSYM ("gg");
X YY_BREAK
Xcase 82:
XYY_USER_ACTION
X# line 109 "src/c++2latex.l"
XSYM ("leq");
X YY_BREAK
Xcase 83:
XYY_USER_ACTION
X# line 110 "src/c++2latex.l"
XSYM ("geq");
X YY_BREAK
Xcase 84:
XYY_USER_ACTION
X# line 111 "src/c++2latex.l"
XSYM ("neq");
X YY_BREAK
Xcase 85:
XYY_USER_ACTION
X# line 112 "src/c++2latex.l"
XSYM ("mid\\mid");
X YY_BREAK
Xcase 86:
XYY_USER_ACTION
X# line 113 "src/c++2latex.l"
XSYM ("ldots");
X YY_BREAK
Xcase 87:
XYY_USER_ACTION
X# line 114 "src/c++2latex.l"
XSYM ("ast=");
X YY_BREAK
Xcase 88:
XYY_USER_ACTION
X# line 115 "src/c++2latex.l"
XSYM ("ll=");
X YY_BREAK
Xcase 89:
XYY_USER_ACTION
X# line 116 "src/c++2latex.l"
XSYM ("gg=");
X YY_BREAK
Xcase 90:
XYY_USER_ACTION
X# line 117 "src/c++2latex.l"
XSYM ("vee=");
X YY_BREAK
Xcase 91:
XYY_USER_ACTION
X# line 118 "src/c++2latex.l"
XSYM ("mid=");
X YY_BREAK
Xcase 92:
XYY_USER_ACTION
X# line 119 "src/c++2latex.l"
XSYM ("sim");
X YY_BREAK
Xcase 93:
XYY_USER_ACTION
X# line 120 "src/c++2latex.l"
XSYM ("ast");
X YY_BREAK
Xcase 94:
XYY_USER_ACTION
X# line 121 "src/c++2latex.l"
XSYM ("wedge");
X YY_BREAK
Xcase 95:
XYY_USER_ACTION
X# line 122 "src/c++2latex.l"
XSYM ("mid");
X YY_BREAK
Xcase 96:
XYY_USER_ACTION
X# line 123 "src/c++2latex.l"
XSYM ("rightarrow\\ast");
X YY_BREAK
Xcase 97:
XYY_USER_ACTION
X# line 124 "src/c++2latex.l"
XOUT ("$/$");
X YY_BREAK
Xcase 98:
XYY_USER_ACTION
X# line 125 "src/c++2latex.l"
XOUT ("$<$");
X YY_BREAK
Xcase 99:
XYY_USER_ACTION
X# line 126 "src/c++2latex.l"
XOUT ("$>$");
X YY_BREAK
Xcase 100:
XYY_USER_ACTION
X# line 127 "src/c++2latex.l"
XOUT ("\\&\\&");
X YY_BREAK
Xcase 101:
XYY_USER_ACTION
X# line 128 "src/c++2latex.l"
XOUT ("\\%=");
X YY_BREAK
Xcase 102:
XYY_USER_ACTION
X# line 129 "src/c++2latex.l"
XOUT ("\\&=");
X YY_BREAK
Xcase 103:
XYY_USER_ACTION
X# line 130 "src/c++2latex.l"
XOUT ("\\{");
X YY_BREAK
Xcase 104:
XYY_USER_ACTION
X# line 131 "src/c++2latex.l"
XOUT ("\\}");
X YY_BREAK
Xcase 105:
XYY_USER_ACTION
X# line 132 "src/c++2latex.l"
XOUT ("\\&");
X YY_BREAK
Xcase 106:
XYY_USER_ACTION
X# line 133 "src/c++2latex.l"
XOUT ("\\%");
X YY_BREAK
Xcase 107:
XYY_USER_ACTION
X# line 134 "src/c++2latex.l"
XOUT ("-{}-");
X YY_BREAK
Xcase 108:
XYY_USER_ACTION
X# line 135 "src/c++2latex.l"
XOUT (".$\\ast$");
X YY_BREAK
Xcase 109:
X# line 137 "src/c++2latex.l"
Xcase 110:
X# line 138 "src/c++2latex.l"
Xcase 111:
X# line 139 "src/c++2latex.l"
Xcase 112:
X# line 140 "src/c++2latex.l"
Xcase 113:
X# line 141 "src/c++2latex.l"
Xcase 114:
X# line 142 "src/c++2latex.l"
Xcase 115:
X# line 143 "src/c++2latex.l"
Xcase 116:
X# line 144 "src/c++2latex.l"
Xcase 117:
X# line 145 "src/c++2latex.l"
Xcase 118:
X# line 146 "src/c++2latex.l"
Xcase 119:
X# line 147 "src/c++2latex.l"
Xcase 120:
X# line 148 "src/c++2latex.l"
Xcase 121:
X# line 149 "src/c++2latex.l"
Xcase 122:
X# line 150 "src/c++2latex.l"
Xcase 123:
X# line 151 "src/c++2latex.l"
Xcase 124:
X# line 152 "src/c++2latex.l"
Xcase 125:
X# line 153 "src/c++2latex.l"
Xcase 126:
X# line 154 "src/c++2latex.l"
Xcase 127:
XYY_USER_ACTION
X# line 154 "src/c++2latex.l"
XECHO;
X YY_BREAK
X /* identifiers: may contain $ chars */
Xcase 128:
XYY_USER_ACTION
X# line 158 "src/c++2latex.l"
XSUB (yytext);
X YY_BREAK
X /* 1. Asterisk comments mini scanner */
X /* 1.1. Curly brace comment */
Xcase 129:
XYY_USER_ACTION
X# line 163 "src/c++2latex.l"
X{ BEGIN (ASTCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X YY_BREAK
X /* 1.2. Comments at the beginning of a line */
Xcase 130:
XYY_USER_ACTION
X# line 170 "src/c++2latex.l"
X{ BEGIN (ASTCOMMENT);
X FONT (comment_font);
X REPARSE; }
X YY_BREAK
X /* 1.3. Other comments, aligned to right side of paper */
Xcase 131:
XYY_USER_ACTION
X# line 175 "src/c++2latex.l"
X{ BEGIN (ASTCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X YY_BREAK
Xcase 132:
XYY_USER_ACTION
X# line 184 "src/c++2latex.l"
X{ INIT; OUT ("$\\ast$/}"); }
X YY_BREAK
Xcase 133:
XYY_USER_ACTION
X# line 185 "src/c++2latex.l"
X{ OUT ("}\\mbox{}\\\\\n"); FONT (comment_font); }
X YY_BREAK
Xcase 134:
XYY_USER_ACTION
X# line 186 "src/c++2latex.l"
XIND;
X YY_BREAK
Xcase 135:
XYY_USER_ACTION
X# line 187 "src/c++2latex.l"
XSUB (yytext);
X YY_BREAK
X /* 2. Double slash ``//'' comments mini scanner */
X /* 2.1. Curly brace comment */
Xcase 136:
XYY_USER_ACTION
X# line 191 "src/c++2latex.l"
X{ BEGIN (SLASHCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("//");}
X YY_BREAK
X /* 2.2. Complete line comment */
Xcase 137:
XYY_USER_ACTION
X# line 198 "src/c++2latex.l"
X{ BEGIN (SLASHCOMMENT);
X FONT (comment_font);
X REPARSE; }
X YY_BREAK
X /* 2.3. Other comments */
Xcase 138:
XYY_USER_ACTION
X# line 203 "src/c++2latex.l"
X{ BEGIN (SLASHCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("//"); }
X YY_BREAK
Xcase 139:
XYY_USER_ACTION
X# line 212 "src/c++2latex.l"
X{ INIT; OUT ("}\\mbox{}\\\\\n"); }
X YY_BREAK
Xcase 140:
XYY_USER_ACTION
X# line 213 "src/c++2latex.l"
XIND;
X YY_BREAK
Xcase 141:
XYY_USER_ACTION
X# line 214 "src/c++2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 142:
XYY_USER_ACTION
X# line 217 "src/c++2latex.l"
X{ BEGIN (STRING);
X FONT (string_font); OUT ("\""); }
X YY_BREAK
Xcase 143:
XYY_USER_ACTION
X# line 219 "src/c++2latex.l"
XOUT ("$\\backslash\\backslash$");
X YY_BREAK
Xcase 144:
XYY_USER_ACTION
X# line 220 "src/c++2latex.l"
X{ OUT ("$\\backslash$"); SUB (yytext+1); }
X YY_BREAK
Xcase 145:
XYY_USER_ACTION
X# line 221 "src/c++2latex.l"
X{ INIT; OUT ("\"}"); }
X YY_BREAK
Xcase 146:
XYY_USER_ACTION
X# line 222 "src/c++2latex.l"
XOUT ("\\mbox{}\\\\\n");
X YY_BREAK
Xcase 147:
XYY_USER_ACTION
X# line 223 "src/c++2latex.l"
XIND;
X YY_BREAK
Xcase 148:
XYY_USER_ACTION
X# line 224 "src/c++2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 149:
XYY_USER_ACTION
X# line 226 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase 150:
XYY_USER_ACTION
X# line 228 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase 151:
X# line 231 "src/c++2latex.l"
Xcase 152:
X# line 232 "src/c++2latex.l"
Xcase 153:
X# line 233 "src/c++2latex.l"
Xcase 154:
XYY_USER_ACTION
X# line 233 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase 155:
XYY_USER_ACTION
X# line 235 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase 156:
X# line 238 "src/c++2latex.l"
Xcase 157:
X# line 239 "src/c++2latex.l"
Xcase 158:
X# line 240 "src/c++2latex.l"
Xcase 159:
XYY_USER_ACTION
X# line 240 "src/c++2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 160:
XYY_USER_ACTION
X# line 243 "src/c++2latex.l"
XOUT ("$\\backslash$\\\\\n");
X YY_BREAK
Xcase 161:
XYY_USER_ACTION
X# line 244 "src/c++2latex.l"
XIND;
X YY_BREAK
Xcase 162:
XYY_USER_ACTION
X# line 245 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase 163:
XYY_USER_ACTION
X# line 246 "src/c++2latex.l"
XOUT ("\\newpage\n");
X YY_BREAK
Xcase 164:
XYY_USER_ACTION
X# line 247 "src/c++2latex.l"
XOUT ("\\mbox{}\\\\\n");
X YY_BREAK
Xcase 165:
XYY_USER_ACTION
X# line 248 "src/c++2latex.l"
XECHO;
X YY_BREAK
Xcase YY_STATE_EOF(INITIAL):
Xcase YY_STATE_EOF(STRING):
Xcase YY_STATE_EOF(INCLUDE):
Xcase YY_STATE_EOF(ASTCOMMENT):
Xcase YY_STATE_EOF(SLASHCOMMENT):
X yyterminate();
X
X case YY_END_OF_BUFFER:
X {
X /* Amount of text matched not including the EOB char. */
X int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
X
X /* Undo the effects of YY_DO_BEFORE_ACTION. */
X *yy_cp = yy_hold_char;
X
X if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
X {
X /* We're scanning a new file or input source. It's
X * possible that this happened because the user
X * just pointed yyin at a new source and called
X * yylex(). If so, then we have to assure
X * consistency between yy_current_buffer and our
X * globals. Here is the right place to do so, because
X * this is the first action (other than possibly a
X * back-up) that will match for the new input source.
X */
X yy_n_chars = yy_current_buffer->yy_n_chars;
X yy_current_buffer->yy_input_file = yyin;
X yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
X }
X
X /* Note that here we test for yy_c_buf_p "<=" to the position
X * of the first EOB in the buffer, since yy_c_buf_p will
X * already have been incremented past the NUL character
X * (since all states make transitions on EOB to the
X * end-of-buffer state). Contrast this with the test
X * in input().
X */
X if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
X { /* This was really a NUL. */
X yy_state_type yy_next_state;
X
X yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
X
X yy_current_state = yy_get_previous_state();
X
X /* Okay, we're now positioned to make the NUL
X * transition. We couldn't have
X * yy_get_previous_state() go ahead and do it
X * for us because it doesn't know how to deal
X * with the possibility of jamming (and we don't
X * want to build jamming into it because then it
X * will run more slowly).
X */
X
X yy_next_state = yy_try_NUL_trans( yy_current_state );
X
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X
X if ( yy_next_state )
X {
X /* Consume the NUL. */
X yy_cp = ++yy_c_buf_p;
X yy_current_state = yy_next_state;
X goto yy_match;
X }
X
X else
X {
X yy_cp = yy_c_buf_p;
X goto yy_find_action;
X }
X }
X
X else switch ( yy_get_next_buffer() )
X {
X case EOB_ACT_END_OF_FILE:
X {
X yy_did_buffer_switch_on_eof = 0;
X
X if ( yywrap() )
X {
X /* Note: because we've taken care in
X * yy_get_next_buffer() to have set up
X * yytext, we can now set up
X * yy_c_buf_p so that if some total
X * hoser (like flex itself) wants to
X * call the scanner after we return the
X * YY_NULL, it'll still work - another
X * YY_NULL will get returned.
X */
X yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
X
X yy_act = YY_STATE_EOF(YY_START);
X goto do_action;
X }
X
X else
X {
X if ( ! yy_did_buffer_switch_on_eof )
X YY_NEW_FILE;
X }
X break;
X }
X
X case EOB_ACT_CONTINUE_SCAN:
X yy_c_buf_p =
X yytext_ptr + yy_amount_of_matched_text;
X
X yy_current_state = yy_get_previous_state();
X
X yy_cp = yy_c_buf_p;
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X goto yy_match;
X
X case EOB_ACT_LAST_MATCH:
X yy_c_buf_p =
X &yy_current_buffer->yy_ch_buf[yy_n_chars];
X
X yy_current_state = yy_get_previous_state();
X
X yy_cp = yy_c_buf_p;
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X goto yy_find_action;
X }
X break;
X }
X
X default:
X YY_FATAL_ERROR(
X "fatal flex scanner internal error--no action found" );
X } /* end of action switch */
X } /* end of scanning one token */
X } /* end of yylex */
X
X
X/* yy_get_next_buffer - try to read in a new buffer
X *
X * Returns a code representing an action:
X * EOB_ACT_LAST_MATCH -
X * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
X * EOB_ACT_END_OF_FILE - end of file
X */
X
Xstatic int yy_get_next_buffer()
X {
X register char *dest = yy_current_buffer->yy_ch_buf;
X register char *source = yytext_ptr - 1; /* copy prev. char, too */
X register int number_to_move, i;
X int ret_val;
X
X if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
X YY_FATAL_ERROR(
X "fatal flex scanner internal error--end of buffer missed" );
X
X if ( yy_current_buffer->yy_fill_buffer == 0 )
X { /* Don't try to fill the buffer, so this is an EOF. */
X if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
X {
X /* We matched a singled characater, the EOB, so
X * treat this as a final EOF.
X */
X return EOB_ACT_END_OF_FILE;
X }
X
X else
X {
X /* We matched some text prior to the EOB, first
X * process it.
X */
X return EOB_ACT_LAST_MATCH;
X }
X }
X
X /* Try to read more data. */
X
X /* First move last chars to start of buffer. */
X number_to_move = yy_c_buf_p - yytext_ptr;
X
X for ( i = 0; i < number_to_move; ++i )
X *(dest++) = *(source++);
X
X if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
X /* don't do the read, it's not guaranteed to return an EOF,
X * just force an EOF
X */
X yy_n_chars = 0;
X
X else
X {
X int num_to_read =
X yy_current_buffer->yy_buf_size - number_to_move - 1;
X
X while ( num_to_read <= 0 )
X { /* Not enough room in the buffer - grow it. */
X#ifdef YY_USES_REJECT
X YY_FATAL_ERROR(
X"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
X#else
X
X /* just a shorter name for the current buffer */
X YY_BUFFER_STATE b = yy_current_buffer;
X
X int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
X
X b->yy_buf_size *= 2;
X b->yy_ch_buf = (char *)
X yy_flex_realloc( (void *) b->yy_ch_buf,
X b->yy_buf_size );
X
X if ( ! b->yy_ch_buf )
X YY_FATAL_ERROR(
X "fatal error - scanner input buffer overflow" );
X
X yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
X
X num_to_read = yy_current_buffer->yy_buf_size -
X number_to_move - 1;
X#endif
X }
X
X if ( num_to_read > YY_READ_BUF_SIZE )
X num_to_read = YY_READ_BUF_SIZE;
X
X /* Read in more data. */
X YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
X yy_n_chars, num_to_read );
X }
X
X if ( yy_n_chars == 0 )
X {
X if ( number_to_move - YY_MORE_ADJ == 1 )
X {
X ret_val = EOB_ACT_END_OF_FILE;
X yyrestart( yyin );
X }
X
X else
X {
X ret_val = EOB_ACT_LAST_MATCH;
X yy_current_buffer->yy_buffer_status =
X YY_BUFFER_EOF_PENDING;
X }
X }
X
X else
X ret_val = EOB_ACT_CONTINUE_SCAN;
X
X yy_n_chars += number_to_move;
X yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
X yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
X
X /* yytext begins at the second character in yy_ch_buf; the first
X * character is the one which preceded it before reading in the latest
X * buffer; it needs to be kept around in case it's a newline, so
X * yy_get_previous_state() will have with '^' rules active.
X */
X
X yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
X
X return ret_val;
X }
X
X
X/* yy_get_previous_state - get the state just before the EOB char was reached */
X
Xstatic yy_state_type yy_get_previous_state()
X {
X register yy_state_type yy_current_state;
X register char *yy_cp;
X
X register char *yy_bp = yytext_ptr;
X
X yy_current_state = yy_start;
X if ( yy_bp[-1] == '\n' )
X ++yy_current_state;
X
X for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
X {
X register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
X if ( yy_accept[yy_current_state] )
X {
X yy_last_accepting_state = yy_current_state;
X yy_last_accepting_cpos = yy_cp;
X }
X while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
X {
X yy_current_state = (int) yy_def[yy_current_state];
X if ( yy_current_state >= 467 )
X yy_c = yy_meta[(unsigned int) yy_c];
X }
X yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
X }
X
X return yy_current_state;
X }
X
X
X/* yy_try_NUL_trans - try to make a transition on the NUL character
X *
X * synopsis
X * next_state = yy_try_NUL_trans( current_state );
X */
X
X#ifdef YY_USE_PROTOS
Xstatic yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
X#else
Xstatic yy_state_type yy_try_NUL_trans( yy_current_state )
Xyy_state_type yy_current_state;
X#endif
X {
X register int yy_is_jam;
X register char *yy_cp = yy_c_buf_p;
X
X register YY_CHAR yy_c = 1;
X if ( yy_accept[yy_current_state] )
X {
X yy_last_accepting_state = yy_current_state;
X yy_last_accepting_cpos = yy_cp;
X }
X while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
X {
X yy_current_state = (int) yy_def[yy_current_state];
X if ( yy_current_state >= 467 )
X yy_c = yy_meta[(unsigned int) yy_c];
X }
X yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
X yy_is_jam = (yy_current_state == 466);
X
X return yy_is_jam ? 0 : yy_current_state;
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yyunput( int c, register char *yy_bp )
X#else
Xstatic void yyunput( c, yy_bp )
Xint c;
Xregister char *yy_bp;
X#endif
X {
X register char *yy_cp = yy_c_buf_p;
X
X /* undo effects of setting up yytext */
X *yy_cp = yy_hold_char;
X
X if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
X { /* need to shift things up to make room */
X /* +2 for EOB chars. */
X register int number_to_move = yy_n_chars + 2;
X register char *dest = &yy_current_buffer->yy_ch_buf[
X yy_current_buffer->yy_buf_size + 2];
X register char *source =
X &yy_current_buffer->yy_ch_buf[number_to_move];
X
X while ( source > yy_current_buffer->yy_ch_buf )
X *--dest = *--source;
X
X yy_cp += dest - source;
X yy_bp += dest - source;
X yy_n_chars = yy_current_buffer->yy_buf_size;
X
X if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
X YY_FATAL_ERROR( "flex scanner push-back overflow" );
X }
X
X if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
X yy_cp[-2] = '\n';
X
X *--yy_cp = (char) c;
X
X
X /* Note: the formal parameter *must* be called "yy_bp" for this
X * macro to now work correctly.
X */
X YY_DO_BEFORE_ACTION; /* set up yytext again */
X }
X
X
X#ifdef __cplusplus
Xstatic int yyinput()
X#else
Xstatic int input()
X#endif
X {
X int c;
X
X *yy_c_buf_p = yy_hold_char;
X
X if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
X {
X /* yy_c_buf_p now points to the character we want to return.
X * If this occurs *before* the EOB characters, then it's a
X * valid NUL; if not, then we've hit the end of the buffer.
X */
X if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
X /* This was really a NUL. */
X *yy_c_buf_p = '\0';
X
X else
X { /* need more input */
X yytext_ptr = yy_c_buf_p;
X ++yy_c_buf_p;
X
X switch ( yy_get_next_buffer() )
X {
X case EOB_ACT_END_OF_FILE:
X {
X if ( yywrap() )
X {
X yy_c_buf_p =
X yytext_ptr + YY_MORE_ADJ;
X return EOF;
X }
X
X YY_NEW_FILE;
X#ifdef __cplusplus
X return yyinput();
X#else
X return input();
X#endif
X }
X
X case EOB_ACT_CONTINUE_SCAN:
X yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
X break;
X
X case EOB_ACT_LAST_MATCH:
X#ifdef __cplusplus
X YY_FATAL_ERROR(
X "unexpected last match in yyinput()" );
X#else
X YY_FATAL_ERROR(
X "unexpected last match in input()" );
X#endif
X }
X }
X }
X
X c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
X *yy_c_buf_p = '\0'; /* preserve yytext */
X yy_hold_char = *++yy_c_buf_p;
X
X return c;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yyrestart( FILE *input_file )
X#else
Xvoid yyrestart( input_file )
XFILE *input_file;
X#endif
X {
X if ( ! yy_current_buffer )
X yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
X
X yy_init_buffer( yy_current_buffer, input_file );
X yy_load_buffer_state();
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
X#else
Xvoid yy_switch_to_buffer( new_buffer )
XYY_BUFFER_STATE new_buffer;
X#endif
X {
X if ( yy_current_buffer == new_buffer )
X return;
X
X if ( yy_current_buffer )
X {
X /* Flush out information for old buffer. */
X *yy_c_buf_p = yy_hold_char;
X yy_current_buffer->yy_buf_pos = yy_c_buf_p;
X yy_current_buffer->yy_n_chars = yy_n_chars;
X }
X
X yy_current_buffer = new_buffer;
X yy_load_buffer_state();
X
X /* We don't actually know whether we did this switch during
X * EOF (yywrap()) processing, but the only time this flag
X * is looked at is after yywrap() is called, so it's safe
X * to go ahead and always set it.
X */
X yy_did_buffer_switch_on_eof = 1;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_load_buffer_state( void )
X#else
Xvoid yy_load_buffer_state()
X#endif
X {
X yy_n_chars = yy_current_buffer->yy_n_chars;
X yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
X yyin = yy_current_buffer->yy_input_file;
X yy_hold_char = *yy_c_buf_p;
X }
X
X
X#ifdef YY_USE_PROTOS
XYY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
X#else
XYY_BUFFER_STATE yy_create_buffer( file, size )
XFILE *file;
Xint size;
X#endif
X {
X YY_BUFFER_STATE b;
X
X b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
X
X if ( ! b )
X YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
X
X b->yy_buf_size = size;
X
X /* yy_ch_buf has to be 2 characters longer than the size given because
X * we need to put in 2 end-of-buffer characters.
X */
X b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
X
X if ( ! b->yy_ch_buf )
X YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
X
X yy_init_buffer( b, file );
X
X return b;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_delete_buffer( YY_BUFFER_STATE b )
X#else
Xvoid yy_delete_buffer( b )
XYY_BUFFER_STATE b;
X#endif
X {
X if ( b == yy_current_buffer )
X yy_current_buffer = (YY_BUFFER_STATE) 0;
X
X yy_flex_free( (void *) b->yy_ch_buf );
X yy_flex_free( (void *) b );
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
X#else
Xvoid yy_init_buffer( b, file )
XYY_BUFFER_STATE b;
XFILE *file;
X#endif
X {
X b->yy_input_file = file;
X
X /* We put in the '\n' and start reading from [1] so that an
X * initial match-at-newline will be true.
X */
X
X b->yy_ch_buf[0] = '\n';
X b->yy_n_chars = 1;
X
X /* We always need two end-of-buffer characters. The first causes
X * a transition to the end-of-buffer state. The second causes
X * a jam in that state.
X */
X b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
X b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
X
X b->yy_buf_pos = &b->yy_ch_buf[1];
X
X b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
X
X b->yy_fill_buffer = 1;
X
X b->yy_buffer_status = YY_BUFFER_NEW;
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_push_state( int new_state )
X#else
Xstatic void yy_push_state( new_state )
Xint new_state;
X#endif
X {
X if ( yy_start_stack_ptr >= yy_start_stack_depth )
X {
X int new_size;
X
X yy_start_stack_depth += YY_START_STACK_INCR;
X new_size = yy_start_stack_depth * sizeof( int );
X
X if ( ! yy_start_stack )
X yy_start_stack = (int *) yy_flex_alloc( new_size );
X
X else
X yy_start_stack = (int *) yy_flex_realloc(
X (void *) yy_start_stack, new_size );
X
X if ( ! yy_start_stack )
X YY_FATAL_ERROR(
X "out of memory expanding start-condition stack" );
X }
X
X yy_start_stack[yy_start_stack_ptr++] = YY_START;
X
X BEGIN(new_state);
X }
X
X
Xstatic void yy_pop_state()
X {
X if ( --yy_start_stack_ptr < 0 )
X YY_FATAL_ERROR( "start-condition stack underflow" );
X
X BEGIN(yy_start_stack[yy_start_stack_ptr]);
X }
X
X
Xstatic int yy_top_state()
X {
X return yy_start_stack[yy_start_stack_ptr - 1];
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_fatal_error( const char msg[] )
X#else
Xstatic void yy_fatal_error( msg )
Xchar msg[];
X#endif
X {
X (void) fprintf( stderr, "%s\n", msg );
X exit( 1 );
X }
X
X
X
X/* Redefine yyless() so it works in section 3 code. */
X
X#undef yyless
X#define yyless(n) \
X do \
X { \
X /* Undo effects of setting up yytext. */ \
X yytext[yyleng] = yy_hold_char; \
X yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
X yy_hold_char = *yy_c_buf_p; \
X *yy_c_buf_p = '\0'; \
X yyleng = n; \
X } \
X while ( 0 )
X
X
X/* Internal utility routines. */
X
X#ifndef yytext_ptr
X#ifdef YY_USE_PROTOS
Xstatic void yy_flex_strncpy( char *s1, const char *s2, int n )
X#else
Xstatic void yy_flex_strncpy( s1, s2, n )
Xchar *s1;
Xconst char *s2;
Xint n;
X#endif
X {
X register int i;
X for ( i = 0; i < n; ++i )
X s1[i] = s2[i];
X }
X#endif
X
X
X#ifdef YY_USE_PROTOS
Xstatic void *yy_flex_alloc( unsigned int size )
X#else
Xstatic void *yy_flex_alloc( size )
Xunsigned int size;
X#endif
X {
X return (void *) malloc( size );
X }
X
X#ifdef YY_USE_PROTOS
Xstatic void *yy_flex_realloc( void *ptr, unsigned int size )
X#else
Xstatic void *yy_flex_realloc( ptr, size )
Xvoid *ptr;
Xunsigned int size;
X#endif
X {
X return (void *) realloc( ptr, size );
X }
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_flex_free( void *ptr )
X#else
Xstatic void yy_flex_free( ptr )
Xvoid *ptr;
X#endif
X {
X free( ptr );
X }
X# line 248 "src/c++2latex.l"
X
X
X#include "main.c"
END_OF_FILE
if test 24230 -ne `wc -c <'src/c++2latex.c.B'`; then
echo shar: \"'src/c++2latex.c.B'\" unpacked with wrong size!
elif test -f 'src/c++2latex.c.A'; then
echo shar: Combining \"'src/c++2latex.c'\" \(60263 characters\)
cat 'src/c++2latex.c.A' 'src/c++2latex.c.B' > 'src/c++2latex.c'
if test 60263 -ne `wc -c <'src/c++2latex.c'`; then
echo shar: \"'src/c++2latex.c'\" combined with wrong size!
else
rm src/c++2latex.c.A src/c++2latex.c.B
fi
fi
# end of 'src/c++2latex.c.B'
fi
if test -f 'src/c++2latex.l' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/c++2latex.l'\"
else
echo shar: Extracting \"'src/c++2latex.l'\" \(5174 characters\)
sed "s/^X//" >'src/c++2latex.l' <<'END_OF_FILE'
X/* $Id: c++2latex.l,v 3.0 1994/01/15 17:07:02 joke Rel $ */
X
X%x STRING INCLUDE ASTCOMMENT SLASHCOMMENT
X
X%{
X#include "defs.h"
X%}
X
X%%
X INIT;
X
X"#"[ \t]*"include" { CPP; BEGIN (INCLUDE); }
X
X"#"[ \t]*"define" |
X"#"[ \t]*"elif" |
X"#"[ \t]*"else" |
X"#"[ \t]*"endif" |
X"#"[ \t]*"error" |
X"#"[ \t]*"ex" | /* GCC special */
X"#"[ \t]*"if" |
X"#"[ \t]*"ifdef" |
X"#"[ \t]*"ifndef" |
X"#"[ \t]*"line" |
X"#"[ \t]*"pragma" |
X"#"[ \t]*"undef" CPP;
X
X /* cpp unary # and binary ## commands */
X"#" CPP;
X
X
X<INCLUDE>"<"[^>]*/">" { OUT ("$<$"); FONT (string_font);
X SUB (yytext+1); OUT ("}$>$");
X input(); INIT; }
X<INCLUDE>\"[^\"]*/\" { OUT ("\""); FONT (string_font);
X SUB (yytext+1); OUT ("}\"");
X input(); INIT; }
X<INCLUDE>[ \t]+ ECHO;
X<INCLUDE>[\n] OUT ("\\mbox{}\\\\\n");
X<INCLUDE>. { REPARSE; INIT; }
X
X
X /* from: gcc-2.2/c-parse.gperf */
X"asm" |
X"auto" |
X"break" |
X"char" |
X"case" |
X"const" | /* ANSI */
X"continue" |
X"default" |
X"do" |
X"double" |
X"else" |
X"enum" |
X"extern" |
X"float" |
X"for" |
X"goto" |
X"if" |
X"inline" | /* GCC special */
X"int" |
X"long" |
X"register" |
X"return" |
X"short" |
X"signed" | /* ANSI */
X"sizeof" |
X"static" |
X"struct" |
X"switch" |
X"typedef" |
X"typeof" | /* GCC special */
X"union" |
X"unsigned" |
X"void" |
X"volatile" |
X"while" |
X
X /* from: gcc-2.2/gplus.gperf */
X"all" | /* GCC special */
X"except" | /* GCC special */
X"exception" | /* GCC special */
X"raise" | /* GCC special */
X"raises" | /* GCC special */
X"reraise" | /* GCC special */
X"throw" | /* GCC special */
X"try" | /* GCC special */
X"catch" |
X"class" |
X"classof" |
X"delete" |
X"dynamic" |
X"friend" |
X"headof" |
X"new" |
X"operator" |
X"overload" |
X"private" |
X"protected" |
X"public" |
X"this" |
X"template" |
X"virtual" KEY;
X
X
X"->" SYM ("rightarrow");
X"<<" SYM ("ll");
X">>" SYM ("gg");
X"<=" SYM ("leq");
X">=" SYM ("geq");
X"!=" SYM ("neq");
X"||" SYM ("mid\\mid");
X"..." SYM ("ldots");
X"*=" SYM ("ast=");
X"<<=" SYM ("ll=");
X">>=" SYM ("gg=");
X"^=" SYM ("vee=");
X"|=" SYM ("mid=");
X"~" SYM ("sim");
X"*" SYM ("ast");
X"^" SYM ("wedge");
X"|" SYM ("mid");
X"->*" SYM ("rightarrow\\ast");
X"/" OUT ("$/$");
X"<" OUT ("$<$");
X">" OUT ("$>$");
X"&&" OUT ("\\&\\&");
X"%=" OUT ("\\%=");
X"&=" OUT ("\\&=");
X"{" OUT ("\\{");
X"}" OUT ("\\}");
X"&" OUT ("\\&");
X"%" OUT ("\\%");
X"--" OUT ("-{}-");
X".*" OUT (".$\\ast$");
X"?" |
X":" |
X"=" |
X"," |
X"." |
X";" |
X"!" |
X"-" |
X"+" |
X"/=" |
X"==" |
X"++" |
X"+=" |
X"-=" |
X"(" |
X")" |
X"[" |
X"]" |
X"::" ECHO;
X
X
X /* identifiers: may contain $ chars */
X[a-zA-Z_$][a-zA-Z_$0-9]* SUB (yytext);
X
X
X /* 1. Asterisk comments mini scanner */
X /* 1.1. Curly brace comment */
X"}"[ \t]*"/*" { BEGIN (ASTCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X
X /* 1.2. Comments at the beginning of a line */
X^[ \t]*"/*" { BEGIN (ASTCOMMENT);
X FONT (comment_font);
X REPARSE; }
X
X /* 1.3. Other comments, aligned to right side of paper */
X"/*" { BEGIN (ASTCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X
X<ASTCOMMENT>"*/" { INIT; OUT ("$\\ast$/}"); }
X<ASTCOMMENT>"\n" { OUT ("}\\mbox{}\\\\\n"); FONT (comment_font); }
X<ASTCOMMENT>[ \t]+ IND;
X<ASTCOMMENT>. SUB (yytext);
X
X /* 2. Double slash ``//'' comments mini scanner */
X /* 2.1. Curly brace comment */
X}[ \t]*"//" { BEGIN (SLASHCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("//");}
X
X /* 2.2. Complete line comment */
X^[ \t]*"//" { BEGIN (SLASHCOMMENT);
X FONT (comment_font);
X REPARSE; }
X
X /* 2.3. Other comments */
X"//" { BEGIN (SLASHCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("//"); }
X
X<SLASHCOMMENT>"\n" { INIT; OUT ("}\\mbox{}\\\\\n"); }
X<SLASHCOMMENT>[ \t]+ IND;
X<SLASHCOMMENT>. SUB (yytext);
X
X
XL?\" { BEGIN (STRING);
X FONT (string_font); OUT ("\""); }
X<STRING>\\\\ OUT ("$\\backslash\\backslash$");
X<STRING>\\[bfnrtv'"] { OUT ("$\\backslash$"); SUB (yytext+1); }
X<STRING>\" { INIT; OUT ("\"}"); }
X<STRING>"\n" OUT ("\\mbox{}\\\\\n");
X<STRING>^[ \t]+ IND;
X<STRING>. SUB (yytext);
X
X0[0-7]+[uUlL]? ECHO;
X
X0x[0-9a-fA-F]+[uUlL]? ECHO;
X
X([0-9]*\.[0-9]+[fFlL]?) |
X([0-9]+\.[0-9]*[fFlL]?) |
X([0-9]*\.?[0-9]+[eE][+-]?[0-9]+) |
X([0-9]+\.?[0-9]*[eE][+-]?[0-9]+) ECHO;
X
X[0-9]+[uUlL]? ECHO;
X
XL?'[ -~]' |
XL?'\\[ntvbrfa\\?'"]' |
XL?'\\[0-7]{1,3}' |
XL?'\\x[0-9a-fA-F]{1,2}' SUB (yytext);
X
X
X"\\\n" OUT ("$\\backslash$\\\\\n");
X^[ \t]+ IND;
X[ \t]+ ECHO;
X"\f"[\n]? OUT ("\\newpage\n");
X"\n" OUT ("\\mbox{}\\\\\n");
X%%
X
X#include "main.c"
END_OF_FILE
if test 5174 -ne `wc -c <'src/c++2latex.l'`; then
echo shar: \"'src/c++2latex.l'\" unpacked with wrong size!
fi
# end of 'src/c++2latex.l'
fi
if test -f 'src/objc2latex.c.B' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'src/objc2latex.c.B'\"
else
echo shar: Extracting \"'src/objc2latex.c.B'\" \(23224 characters\)
sed "s/^X//" >'src/objc2latex.c.B' <<'END_OF_FILE'
XYY_USER_ACTION
X# line 94 "src/objc2latex.l"
XSYM ("gg");
X YY_BREAK
Xcase 68:
XYY_USER_ACTION
X# line 95 "src/objc2latex.l"
XSYM ("leq");
X YY_BREAK
Xcase 69:
XYY_USER_ACTION
X# line 96 "src/objc2latex.l"
XSYM ("geq");
X YY_BREAK
Xcase 70:
XYY_USER_ACTION
X# line 97 "src/objc2latex.l"
XSYM ("neq");
X YY_BREAK
Xcase 71:
XYY_USER_ACTION
X# line 98 "src/objc2latex.l"
XSYM ("mid\\mid");
X YY_BREAK
Xcase 72:
XYY_USER_ACTION
X# line 99 "src/objc2latex.l"
XSYM ("ldots");
X YY_BREAK
Xcase 73:
XYY_USER_ACTION
X# line 100 "src/objc2latex.l"
XSYM ("ast=");
X YY_BREAK
Xcase 74:
XYY_USER_ACTION
X# line 101 "src/objc2latex.l"
XSYM ("ll=");
X YY_BREAK
Xcase 75:
XYY_USER_ACTION
X# line 102 "src/objc2latex.l"
XSYM ("gg=");
X YY_BREAK
Xcase 76:
XYY_USER_ACTION
X# line 103 "src/objc2latex.l"
XSYM ("vee=");
X YY_BREAK
Xcase 77:
XYY_USER_ACTION
X# line 104 "src/objc2latex.l"
XSYM ("mid=");
X YY_BREAK
Xcase 78:
XYY_USER_ACTION
X# line 105 "src/objc2latex.l"
XSYM ("sim");
X YY_BREAK
Xcase 79:
XYY_USER_ACTION
X# line 106 "src/objc2latex.l"
XSYM ("ast");
X YY_BREAK
Xcase 80:
XYY_USER_ACTION
X# line 107 "src/objc2latex.l"
XSYM ("wedge");
X YY_BREAK
Xcase 81:
XYY_USER_ACTION
X# line 108 "src/objc2latex.l"
XSYM ("mid");
X YY_BREAK
Xcase 82:
XYY_USER_ACTION
X# line 109 "src/objc2latex.l"
XOUT ("$/$");
X YY_BREAK
Xcase 83:
XYY_USER_ACTION
X# line 110 "src/objc2latex.l"
XOUT ("$<$");
X YY_BREAK
Xcase 84:
XYY_USER_ACTION
X# line 111 "src/objc2latex.l"
XOUT ("$>$");
X YY_BREAK
Xcase 85:
XYY_USER_ACTION
X# line 112 "src/objc2latex.l"
XOUT ("\\&\\&");
X YY_BREAK
Xcase 86:
XYY_USER_ACTION
X# line 113 "src/objc2latex.l"
XOUT ("\\%=");
X YY_BREAK
Xcase 87:
XYY_USER_ACTION
X# line 114 "src/objc2latex.l"
XOUT ("\\&=");
X YY_BREAK
Xcase 88:
XYY_USER_ACTION
X# line 115 "src/objc2latex.l"
XOUT ("\\{");
X YY_BREAK
Xcase 89:
XYY_USER_ACTION
X# line 116 "src/objc2latex.l"
XOUT ("\\}");
X YY_BREAK
Xcase 90:
XYY_USER_ACTION
X# line 117 "src/objc2latex.l"
XOUT ("\\&");
X YY_BREAK
Xcase 91:
XYY_USER_ACTION
X# line 118 "src/objc2latex.l"
XOUT ("\\%");
X YY_BREAK
Xcase 92:
XYY_USER_ACTION
X# line 119 "src/objc2latex.l"
XOUT ("-{}-");
X YY_BREAK
Xcase 93:
X# line 121 "src/objc2latex.l"
Xcase 94:
X# line 122 "src/objc2latex.l"
Xcase 95:
X# line 123 "src/objc2latex.l"
Xcase 96:
X# line 124 "src/objc2latex.l"
Xcase 97:
X# line 125 "src/objc2latex.l"
Xcase 98:
X# line 126 "src/objc2latex.l"
Xcase 99:
X# line 127 "src/objc2latex.l"
Xcase 100:
X# line 128 "src/objc2latex.l"
Xcase 101:
X# line 129 "src/objc2latex.l"
Xcase 102:
X# line 130 "src/objc2latex.l"
Xcase 103:
X# line 131 "src/objc2latex.l"
Xcase 104:
X# line 132 "src/objc2latex.l"
Xcase 105:
X# line 133 "src/objc2latex.l"
Xcase 106:
X# line 134 "src/objc2latex.l"
Xcase 107:
X# line 135 "src/objc2latex.l"
Xcase 108:
X# line 136 "src/objc2latex.l"
Xcase 109:
X# line 137 "src/objc2latex.l"
Xcase 110:
XYY_USER_ACTION
X# line 137 "src/objc2latex.l"
XECHO;
X YY_BREAK
X /* identifiers: may contain $ chars */
Xcase 111:
XYY_USER_ACTION
X# line 141 "src/objc2latex.l"
XSUB (yytext);
X YY_BREAK
X /* 1. Asterisk comments mini scanner */
X /* 1.1. Curly brace comment */
Xcase 112:
XYY_USER_ACTION
X# line 145 "src/objc2latex.l"
X{ BEGIN (ASTCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X YY_BREAK
X /* 1.2. Comments at the beginning of a line */
Xcase 113:
XYY_USER_ACTION
X# line 152 "src/objc2latex.l"
X{ BEGIN (ASTCOMMENT);
X FONT (comment_font);
X REPARSE; }
X YY_BREAK
X /* 1.3. Other comments, aligned to right side of paper */
Xcase 114:
XYY_USER_ACTION
X# line 157 "src/objc2latex.l"
X{ BEGIN (ASTCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("/$\\ast$"); }
X YY_BREAK
Xcase 115:
XYY_USER_ACTION
X# line 166 "src/objc2latex.l"
X{ INIT; OUT ("$\\ast$/}"); }
X YY_BREAK
Xcase 116:
XYY_USER_ACTION
X# line 167 "src/objc2latex.l"
X{ OUT ("}\\mbox{}\\\\\n"); FONT (comment_font); }
X YY_BREAK
Xcase 117:
XYY_USER_ACTION
X# line 168 "src/objc2latex.l"
XIND;
X YY_BREAK
Xcase 118:
XYY_USER_ACTION
X# line 169 "src/objc2latex.l"
XSUB (yytext);
X YY_BREAK
X /* 2. Double slash ``//'' comments mini scanner */
X /* 2.1. Curly brace comment */
Xcase 119:
XYY_USER_ACTION
X# line 173 "src/objc2latex.l"
X{ BEGIN (SLASHCOMMENT);
X OUT ("\\}");
X BTAB;
X FONT (comment_font);
X OUT ("//");}
X YY_BREAK
X /* 2.2. Complete line comment */
Xcase 120:
XYY_USER_ACTION
X# line 180 "src/objc2latex.l"
X{ BEGIN (SLASHCOMMENT);
X FONT (comment_font);
X REPARSE; }
X YY_BREAK
X /* 2.3. Other comments */
Xcase 121:
XYY_USER_ACTION
X# line 185 "src/objc2latex.l"
X{ BEGIN (SLASHCOMMENT);
X if (aligntoright) {
X OUT ("\\hfill");
X } else {
X CTAB;
X }
X FONT (comment_font);
X OUT ("//"); }
X YY_BREAK
Xcase 122:
XYY_USER_ACTION
X# line 194 "src/objc2latex.l"
X{ INIT; OUT ("}\\mbox{}\\\\\n"); }
X YY_BREAK
Xcase 123:
XYY_USER_ACTION
X# line 195 "src/objc2latex.l"
XIND;
X YY_BREAK
Xcase 124:
XYY_USER_ACTION
X# line 196 "src/objc2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 125:
XYY_USER_ACTION
X# line 199 "src/objc2latex.l"
X{ BEGIN (STRING);
X FONT (string_font); OUT ("\""); }
X YY_BREAK
Xcase 126:
XYY_USER_ACTION
X# line 201 "src/objc2latex.l"
XOUT ("$\\backslash\\backslash$");
X YY_BREAK
Xcase 127:
XYY_USER_ACTION
X# line 202 "src/objc2latex.l"
X{ OUT ("$\\backslash$"); SUB (yytext+1); }
X YY_BREAK
Xcase 128:
XYY_USER_ACTION
X# line 203 "src/objc2latex.l"
X{ INIT; OUT ("\"}"); }
X YY_BREAK
Xcase 129:
XYY_USER_ACTION
X# line 204 "src/objc2latex.l"
XOUT ("\\mbox{}\\\\\n");
X YY_BREAK
Xcase 130:
XYY_USER_ACTION
X# line 205 "src/objc2latex.l"
XIND;
X YY_BREAK
Xcase 131:
XYY_USER_ACTION
X# line 206 "src/objc2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 132:
XYY_USER_ACTION
X# line 209 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase 133:
XYY_USER_ACTION
X# line 211 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase 134:
X# line 214 "src/objc2latex.l"
Xcase 135:
X# line 215 "src/objc2latex.l"
Xcase 136:
X# line 216 "src/objc2latex.l"
Xcase 137:
XYY_USER_ACTION
X# line 216 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase 138:
XYY_USER_ACTION
X# line 218 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase 139:
X# line 221 "src/objc2latex.l"
Xcase 140:
X# line 222 "src/objc2latex.l"
Xcase 141:
X# line 223 "src/objc2latex.l"
Xcase 142:
XYY_USER_ACTION
X# line 223 "src/objc2latex.l"
XSUB (yytext);
X YY_BREAK
Xcase 143:
XYY_USER_ACTION
X# line 226 "src/objc2latex.l"
XOUT ("$\\backslash$\\\\\n");
X YY_BREAK
Xcase 144:
XYY_USER_ACTION
X# line 227 "src/objc2latex.l"
XIND;
X YY_BREAK
Xcase 145:
XYY_USER_ACTION
X# line 228 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase 146:
XYY_USER_ACTION
X# line 229 "src/objc2latex.l"
XOUT ("\\newpage\n");
X YY_BREAK
Xcase 147:
XYY_USER_ACTION
X# line 230 "src/objc2latex.l"
XOUT ("\\mbox{}\\\\\n");
X YY_BREAK
Xcase 148:
XYY_USER_ACTION
X# line 231 "src/objc2latex.l"
XECHO;
X YY_BREAK
Xcase YY_STATE_EOF(INITIAL):
Xcase YY_STATE_EOF(STRING):
Xcase YY_STATE_EOF(INCLUDE):
Xcase YY_STATE_EOF(ASTCOMMENT):
Xcase YY_STATE_EOF(SLASHCOMMENT):
X yyterminate();
X
X case YY_END_OF_BUFFER:
X {
X /* Amount of text matched not including the EOB char. */
X int yy_amount_of_matched_text = yy_cp - yytext_ptr - 1;
X
X /* Undo the effects of YY_DO_BEFORE_ACTION. */
X *yy_cp = yy_hold_char;
X
X if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
X {
X /* We're scanning a new file or input source. It's
X * possible that this happened because the user
X * just pointed yyin at a new source and called
X * yylex(). If so, then we have to assure
X * consistency between yy_current_buffer and our
X * globals. Here is the right place to do so, because
X * this is the first action (other than possibly a
X * back-up) that will match for the new input source.
X */
X yy_n_chars = yy_current_buffer->yy_n_chars;
X yy_current_buffer->yy_input_file = yyin;
X yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
X }
X
X /* Note that here we test for yy_c_buf_p "<=" to the position
X * of the first EOB in the buffer, since yy_c_buf_p will
X * already have been incremented past the NUL character
X * (since all states make transitions on EOB to the
X * end-of-buffer state). Contrast this with the test
X * in input().
X */
X if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
X { /* This was really a NUL. */
X yy_state_type yy_next_state;
X
X yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
X
X yy_current_state = yy_get_previous_state();
X
X /* Okay, we're now positioned to make the NUL
X * transition. We couldn't have
X * yy_get_previous_state() go ahead and do it
X * for us because it doesn't know how to deal
X * with the possibility of jamming (and we don't
X * want to build jamming into it because then it
X * will run more slowly).
X */
X
X yy_next_state = yy_try_NUL_trans( yy_current_state );
X
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X
X if ( yy_next_state )
X {
X /* Consume the NUL. */
X yy_cp = ++yy_c_buf_p;
X yy_current_state = yy_next_state;
X goto yy_match;
X }
X
X else
X {
X yy_cp = yy_c_buf_p;
X goto yy_find_action;
X }
X }
X
X else switch ( yy_get_next_buffer() )
X {
X case EOB_ACT_END_OF_FILE:
X {
X yy_did_buffer_switch_on_eof = 0;
X
X if ( yywrap() )
X {
X /* Note: because we've taken care in
X * yy_get_next_buffer() to have set up
X * yytext, we can now set up
X * yy_c_buf_p so that if some total
X * hoser (like flex itself) wants to
X * call the scanner after we return the
X * YY_NULL, it'll still work - another
X * YY_NULL will get returned.
X */
X yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
X
X yy_act = YY_STATE_EOF(YY_START);
X goto do_action;
X }
X
X else
X {
X if ( ! yy_did_buffer_switch_on_eof )
X YY_NEW_FILE;
X }
X break;
X }
X
X case EOB_ACT_CONTINUE_SCAN:
X yy_c_buf_p =
X yytext_ptr + yy_amount_of_matched_text;
X
X yy_current_state = yy_get_previous_state();
X
X yy_cp = yy_c_buf_p;
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X goto yy_match;
X
X case EOB_ACT_LAST_MATCH:
X yy_c_buf_p =
X &yy_current_buffer->yy_ch_buf[yy_n_chars];
X
X yy_current_state = yy_get_previous_state();
X
X yy_cp = yy_c_buf_p;
X yy_bp = yytext_ptr + YY_MORE_ADJ;
X goto yy_find_action;
X }
X break;
X }
X
X default:
X YY_FATAL_ERROR(
X "fatal flex scanner internal error--no action found" );
X } /* end of action switch */
X } /* end of scanning one token */
X } /* end of yylex */
X
X
X/* yy_get_next_buffer - try to read in a new buffer
X *
X * Returns a code representing an action:
X * EOB_ACT_LAST_MATCH -
X * EOB_ACT_CONTINUE_SCAN - continue scanning from current position
X * EOB_ACT_END_OF_FILE - end of file
X */
X
Xstatic int yy_get_next_buffer()
X {
X register char *dest = yy_current_buffer->yy_ch_buf;
X register char *source = yytext_ptr - 1; /* copy prev. char, too */
X register int number_to_move, i;
X int ret_val;
X
X if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
X YY_FATAL_ERROR(
X "fatal flex scanner internal error--end of buffer missed" );
X
X if ( yy_current_buffer->yy_fill_buffer == 0 )
X { /* Don't try to fill the buffer, so this is an EOF. */
X if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
X {
X /* We matched a singled characater, the EOB, so
X * treat this as a final EOF.
X */
X return EOB_ACT_END_OF_FILE;
X }
X
X else
X {
X /* We matched some text prior to the EOB, first
X * process it.
X */
X return EOB_ACT_LAST_MATCH;
X }
X }
X
X /* Try to read more data. */
X
X /* First move last chars to start of buffer. */
X number_to_move = yy_c_buf_p - yytext_ptr;
X
X for ( i = 0; i < number_to_move; ++i )
X *(dest++) = *(source++);
X
X if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
X /* don't do the read, it's not guaranteed to return an EOF,
X * just force an EOF
X */
X yy_n_chars = 0;
X
X else
X {
X int num_to_read =
X yy_current_buffer->yy_buf_size - number_to_move - 1;
X
X while ( num_to_read <= 0 )
X { /* Not enough room in the buffer - grow it. */
X#ifdef YY_USES_REJECT
X YY_FATAL_ERROR(
X"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
X#else
X
X /* just a shorter name for the current buffer */
X YY_BUFFER_STATE b = yy_current_buffer;
X
X int yy_c_buf_p_offset = yy_c_buf_p - b->yy_ch_buf;
X
X b->yy_buf_size *= 2;
X b->yy_ch_buf = (char *)
X yy_flex_realloc( (void *) b->yy_ch_buf,
X b->yy_buf_size );
X
X if ( ! b->yy_ch_buf )
X YY_FATAL_ERROR(
X "fatal error - scanner input buffer overflow" );
X
X yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
X
X num_to_read = yy_current_buffer->yy_buf_size -
X number_to_move - 1;
X#endif
X }
X
X if ( num_to_read > YY_READ_BUF_SIZE )
X num_to_read = YY_READ_BUF_SIZE;
X
X /* Read in more data. */
X YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
X yy_n_chars, num_to_read );
X }
X
X if ( yy_n_chars == 0 )
X {
X if ( number_to_move - YY_MORE_ADJ == 1 )
X {
X ret_val = EOB_ACT_END_OF_FILE;
X yyrestart( yyin );
X }
X
X else
X {
X ret_val = EOB_ACT_LAST_MATCH;
X yy_current_buffer->yy_buffer_status =
X YY_BUFFER_EOF_PENDING;
X }
X }
X
X else
X ret_val = EOB_ACT_CONTINUE_SCAN;
X
X yy_n_chars += number_to_move;
X yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR;
X yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR;
X
X /* yytext begins at the second character in yy_ch_buf; the first
X * character is the one which preceded it before reading in the latest
X * buffer; it needs to be kept around in case it's a newline, so
X * yy_get_previous_state() will have with '^' rules active.
X */
X
X yytext_ptr = &yy_current_buffer->yy_ch_buf[1];
X
X return ret_val;
X }
X
X
X/* yy_get_previous_state - get the state just before the EOB char was reached */
X
Xstatic yy_state_type yy_get_previous_state()
X {
X register yy_state_type yy_current_state;
X register char *yy_cp;
X
X register char *yy_bp = yytext_ptr;
X
X yy_current_state = yy_start;
X if ( yy_bp[-1] == '\n' )
X ++yy_current_state;
X
X for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
X {
X register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
X if ( yy_accept[yy_current_state] )
X {
X yy_last_accepting_state = yy_current_state;
X yy_last_accepting_cpos = yy_cp;
X }
X while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
X {
X yy_current_state = (int) yy_def[yy_current_state];
X if ( yy_current_state >= 417 )
X yy_c = yy_meta[(unsigned int) yy_c];
X }
X yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
X }
X
X return yy_current_state;
X }
X
X
X/* yy_try_NUL_trans - try to make a transition on the NUL character
X *
X * synopsis
X * next_state = yy_try_NUL_trans( current_state );
X */
X
X#ifdef YY_USE_PROTOS
Xstatic yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state )
X#else
Xstatic yy_state_type yy_try_NUL_trans( yy_current_state )
Xyy_state_type yy_current_state;
X#endif
X {
X register int yy_is_jam;
X register char *yy_cp = yy_c_buf_p;
X
X register YY_CHAR yy_c = 1;
X if ( yy_accept[yy_current_state] )
X {
X yy_last_accepting_state = yy_current_state;
X yy_last_accepting_cpos = yy_cp;
X }
X while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
X {
X yy_current_state = (int) yy_def[yy_current_state];
X if ( yy_current_state >= 417 )
X yy_c = yy_meta[(unsigned int) yy_c];
X }
X yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
X yy_is_jam = (yy_current_state == 416);
X
X return yy_is_jam ? 0 : yy_current_state;
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yyunput( int c, register char *yy_bp )
X#else
Xstatic void yyunput( c, yy_bp )
Xint c;
Xregister char *yy_bp;
X#endif
X {
X register char *yy_cp = yy_c_buf_p;
X
X /* undo effects of setting up yytext */
X *yy_cp = yy_hold_char;
X
X if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
X { /* need to shift things up to make room */
X /* +2 for EOB chars. */
X register int number_to_move = yy_n_chars + 2;
X register char *dest = &yy_current_buffer->yy_ch_buf[
X yy_current_buffer->yy_buf_size + 2];
X register char *source =
X &yy_current_buffer->yy_ch_buf[number_to_move];
X
X while ( source > yy_current_buffer->yy_ch_buf )
X *--dest = *--source;
X
X yy_cp += dest - source;
X yy_bp += dest - source;
X yy_n_chars = yy_current_buffer->yy_buf_size;
X
X if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
X YY_FATAL_ERROR( "flex scanner push-back overflow" );
X }
X
X if ( yy_cp > yy_bp && yy_cp[-1] == '\n' )
X yy_cp[-2] = '\n';
X
X *--yy_cp = (char) c;
X
X
X /* Note: the formal parameter *must* be called "yy_bp" for this
X * macro to now work correctly.
X */
X YY_DO_BEFORE_ACTION; /* set up yytext again */
X }
X
X
X#ifdef __cplusplus
Xstatic int yyinput()
X#else
Xstatic int input()
X#endif
X {
X int c;
X
X *yy_c_buf_p = yy_hold_char;
X
X if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR )
X {
X /* yy_c_buf_p now points to the character we want to return.
X * If this occurs *before* the EOB characters, then it's a
X * valid NUL; if not, then we've hit the end of the buffer.
X */
X if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
X /* This was really a NUL. */
X *yy_c_buf_p = '\0';
X
X else
X { /* need more input */
X yytext_ptr = yy_c_buf_p;
X ++yy_c_buf_p;
X
X switch ( yy_get_next_buffer() )
X {
X case EOB_ACT_END_OF_FILE:
X {
X if ( yywrap() )
X {
X yy_c_buf_p =
X yytext_ptr + YY_MORE_ADJ;
X return EOF;
X }
X
X YY_NEW_FILE;
X#ifdef __cplusplus
X return yyinput();
X#else
X return input();
X#endif
X }
X
X case EOB_ACT_CONTINUE_SCAN:
X yy_c_buf_p = yytext_ptr + YY_MORE_ADJ;
X break;
X
X case EOB_ACT_LAST_MATCH:
X#ifdef __cplusplus
X YY_FATAL_ERROR(
X "unexpected last match in yyinput()" );
X#else
X YY_FATAL_ERROR(
X "unexpected last match in input()" );
X#endif
X }
X }
X }
X
X c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
X *yy_c_buf_p = '\0'; /* preserve yytext */
X yy_hold_char = *++yy_c_buf_p;
X
X return c;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yyrestart( FILE *input_file )
X#else
Xvoid yyrestart( input_file )
XFILE *input_file;
X#endif
X {
X if ( ! yy_current_buffer )
X yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE );
X
X yy_init_buffer( yy_current_buffer, input_file );
X yy_load_buffer_state();
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_switch_to_buffer( YY_BUFFER_STATE new_buffer )
X#else
Xvoid yy_switch_to_buffer( new_buffer )
XYY_BUFFER_STATE new_buffer;
X#endif
X {
X if ( yy_current_buffer == new_buffer )
X return;
X
X if ( yy_current_buffer )
X {
X /* Flush out information for old buffer. */
X *yy_c_buf_p = yy_hold_char;
X yy_current_buffer->yy_buf_pos = yy_c_buf_p;
X yy_current_buffer->yy_n_chars = yy_n_chars;
X }
X
X yy_current_buffer = new_buffer;
X yy_load_buffer_state();
X
X /* We don't actually know whether we did this switch during
X * EOF (yywrap()) processing, but the only time this flag
X * is looked at is after yywrap() is called, so it's safe
X * to go ahead and always set it.
X */
X yy_did_buffer_switch_on_eof = 1;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_load_buffer_state( void )
X#else
Xvoid yy_load_buffer_state()
X#endif
X {
X yy_n_chars = yy_current_buffer->yy_n_chars;
X yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
X yyin = yy_current_buffer->yy_input_file;
X yy_hold_char = *yy_c_buf_p;
X }
X
X
X#ifdef YY_USE_PROTOS
XYY_BUFFER_STATE yy_create_buffer( FILE *file, int size )
X#else
XYY_BUFFER_STATE yy_create_buffer( file, size )
XFILE *file;
Xint size;
X#endif
X {
X YY_BUFFER_STATE b;
X
X b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
X
X if ( ! b )
X YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
X
X b->yy_buf_size = size;
X
X /* yy_ch_buf has to be 2 characters longer than the size given because
X * we need to put in 2 end-of-buffer characters.
X */
X b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
X
X if ( ! b->yy_ch_buf )
X YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
X
X yy_init_buffer( b, file );
X
X return b;
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_delete_buffer( YY_BUFFER_STATE b )
X#else
Xvoid yy_delete_buffer( b )
XYY_BUFFER_STATE b;
X#endif
X {
X if ( b == yy_current_buffer )
X yy_current_buffer = (YY_BUFFER_STATE) 0;
X
X yy_flex_free( (void *) b->yy_ch_buf );
X yy_flex_free( (void *) b );
X }
X
X
X#ifdef YY_USE_PROTOS
Xvoid yy_init_buffer( YY_BUFFER_STATE b, FILE *file )
X#else
Xvoid yy_init_buffer( b, file )
XYY_BUFFER_STATE b;
XFILE *file;
X#endif
X {
X b->yy_input_file = file;
X
X /* We put in the '\n' and start reading from [1] so that an
X * initial match-at-newline will be true.
X */
X
X b->yy_ch_buf[0] = '\n';
X b->yy_n_chars = 1;
X
X /* We always need two end-of-buffer characters. The first causes
X * a transition to the end-of-buffer state. The second causes
X * a jam in that state.
X */
X b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
X b->yy_ch_buf[2] = YY_END_OF_BUFFER_CHAR;
X
X b->yy_buf_pos = &b->yy_ch_buf[1];
X
X b->yy_is_interactive = file ? isatty( fileno(file) ) : 0;
X
X b->yy_fill_buffer = 1;
X
X b->yy_buffer_status = YY_BUFFER_NEW;
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_push_state( int new_state )
X#else
Xstatic void yy_push_state( new_state )
Xint new_state;
X#endif
X {
X if ( yy_start_stack_ptr >= yy_start_stack_depth )
X {
X int new_size;
X
X yy_start_stack_depth += YY_START_STACK_INCR;
X new_size = yy_start_stack_depth * sizeof( int );
X
X if ( ! yy_start_stack )
X yy_start_stack = (int *) yy_flex_alloc( new_size );
X
X else
X yy_start_stack = (int *) yy_flex_realloc(
X (void *) yy_start_stack, new_size );
X
X if ( ! yy_start_stack )
X YY_FATAL_ERROR(
X "out of memory expanding start-condition stack" );
X }
X
X yy_start_stack[yy_start_stack_ptr++] = YY_START;
X
X BEGIN(new_state);
X }
X
X
Xstatic void yy_pop_state()
X {
X if ( --yy_start_stack_ptr < 0 )
X YY_FATAL_ERROR( "start-condition stack underflow" );
X
X BEGIN(yy_start_stack[yy_start_stack_ptr]);
X }
X
X
Xstatic int yy_top_state()
X {
X return yy_start_stack[yy_start_stack_ptr - 1];
X }
X
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_fatal_error( const char msg[] )
X#else
Xstatic void yy_fatal_error( msg )
Xchar msg[];
X#endif
X {
X (void) fprintf( stderr, "%s\n", msg );
X exit( 1 );
X }
X
X
X
X/* Redefine yyless() so it works in section 3 code. */
X
X#undef yyless
X#define yyless(n) \
X do \
X { \
X /* Undo effects of setting up yytext. */ \
X yytext[yyleng] = yy_hold_char; \
X yy_c_buf_p = yytext + n - YY_MORE_ADJ; \
X yy_hold_char = *yy_c_buf_p; \
X *yy_c_buf_p = '\0'; \
X yyleng = n; \
X } \
X while ( 0 )
X
X
X/* Internal utility routines. */
X
X#ifndef yytext_ptr
X#ifdef YY_USE_PROTOS
Xstatic void yy_flex_strncpy( char *s1, const char *s2, int n )
X#else
Xstatic void yy_flex_strncpy( s1, s2, n )
Xchar *s1;
Xconst char *s2;
Xint n;
X#endif
X {
X register int i;
X for ( i = 0; i < n; ++i )
X s1[i] = s2[i];
X }
X#endif
X
X
X#ifdef YY_USE_PROTOS
Xstatic void *yy_flex_alloc( unsigned int size )
X#else
Xstatic void *yy_flex_alloc( size )
Xunsigned int size;
X#endif
X {
X return (void *) malloc( size );
X }
X
X#ifdef YY_USE_PROTOS
Xstatic void *yy_flex_realloc( void *ptr, unsigned int size )
X#else
Xstatic void *yy_flex_realloc( ptr, size )
Xvoid *ptr;
Xunsigned int size;
X#endif
X {
X return (void *) realloc( ptr, size );
X }
X
X#ifdef YY_USE_PROTOS
Xstatic void yy_flex_free( void *ptr )
X#else
Xstatic void yy_flex_free( ptr )
Xvoid *ptr;
X#endif
X {
X free( ptr );
X }
X# line 231 "src/objc2latex.l"
X
X
X#include "main.c"
END_OF_FILE
if test 23224 -ne `wc -c <'src/objc2latex.c.B'`; then
echo shar: \"'src/objc2latex.c.B'\" unpacked with wrong size!
elif test -f 'src/objc2latex.c.A'; then
echo shar: Combining \"'src/objc2latex.c'\" \(58178 characters\)
cat 'src/objc2latex.c.A' 'src/objc2latex.c.B' > 'src/objc2latex.c'
if test 58178 -ne `wc -c <'src/objc2latex.c'`; then
echo shar: \"'src/objc2latex.c'\" combined with wrong size!
else
rm src/objc2latex.c.A src/objc2latex.c.B
fi
fi
# end of 'src/objc2latex.c.B'
fi
echo shar: End of archive 5 \(of 8\).
cp /dev/null ark5isdone
MISSING=""
for I in 1 2 3 4 5 6 7 8 ; do
if test ! -f ark${I}isdone ; then
MISSING="${MISSING} ${I}"
fi
done
if test "${MISSING}" = "" ; then
echo You have unpacked all 8 archives.
rm -f ark[1-9]isdone
else
echo You still must unpack the following archives:
echo " " ${MISSING}
fi
exit 0
exit 0 # Just in case...