home *** CD-ROM | disk | FTP | other *** search
- From: joke@germany.eu.net (Joerg Heitkoetter)
- Newsgroups: comp.sources.misc
- Subject: v44i011: c++2latex - A set of LaTeX converters for the whole C family, v3.0, Part02/08
- Date: 7 Aug 1994 16:42:52 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <323kgs$gla@sparky.sterling.com>
- X-Md4-Signature: 3dcf6b3c49cb3ff5d1db59b67185634b
-
- Submitted-by: joke@germany.eu.net (Joerg Heitkoetter)
- Posting-number: Volume 44, Issue 11
- Archive-name: c++2latex/part02
- 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: src/ansic2latex.c
- # Wrapped by kent@sparky on Sun Aug 7 16:11:52 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 2 (of 8)."'
- if test -f 'src/ansic2latex.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'src/ansic2latex.c'\"
- else
- echo shar: Extracting \"'src/ansic2latex.c'\" \(54213 characters\)
- sed "s/^X//" >'src/ansic2latex.c' <<'END_OF_FILE'
- X/* A lexical scanner generated by flex */
- X
- X/* Scanner skeleton version:
- X * $Header: /home/daffy/u0/vern/flex/flex-2.4.7/RCS/flex.skl,v 1.2 94/08/03 11:13:24 vern Exp $
- X */
- X
- X#define FLEX_SCANNER
- X
- X#include <stdio.h>
- X
- X
- X/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */
- X#ifdef c_plusplus
- X#ifndef __cplusplus
- X#define __cplusplus
- X#endif
- X#endif
- X
- X
- X#ifdef __cplusplus
- X
- X#include <stdlib.h>
- X#include <unistd.h>
- X
- X/* Use prototypes in function declarations. */
- X#define YY_USE_PROTOS
- X
- X/* The "const" storage-class-modifier is valid. */
- X#define YY_USE_CONST
- X
- X#else /* ! __cplusplus */
- X
- X#ifdef __STDC__
- X
- X#define YY_USE_PROTOS
- X#define YY_USE_CONST
- X
- X#endif /* __STDC__ */
- X#endif /* ! __cplusplus */
- X
- X
- X#ifdef __TURBOC__
- X#define YY_USE_CONST
- X#endif
- X
- X
- X#ifndef YY_USE_CONST
- X#ifndef const
- X#define const
- X#endif
- X#endif
- X
- X
- X#ifdef YY_USE_PROTOS
- X#define YY_PROTO(proto) proto
- X#else
- X#define YY_PROTO(proto) ()
- X#endif
- X
- X/* Returned upon end-of-file. */
- X#define YY_NULL 0
- X
- X/* Promotes a possibly negative, possibly signed char to an unsigned
- X * integer for use as an array index. If the signed char is negative,
- X * we want to instead treat it as an 8-bit unsigned char, hence the
- X * double cast.
- X */
- X#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c)
- X
- X/* Enter a start condition. This macro really ought to take a parameter,
- X * but we do it the disgusting crufty way forced on us by the ()-less
- X * definition of BEGIN.
- X */
- X#define BEGIN yy_start = 1 + 2 *
- X
- X/* Translate the current start state into a value that can be later handed
- X * to BEGIN to return to the state.
- X */
- X#define YY_START ((yy_start - 1) / 2)
- X
- X/* Action number for EOF rule of a given start state. */
- X#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1)
- X
- X/* Special action meaning "start processing a new file". Now included
- X * only for backward compatibility with previous versions of flex.
- X */
- X#define YY_NEW_FILE yyrestart( yyin )
- X
- X#define YY_END_OF_BUFFER_CHAR 0
- X
- X/* Size of default input buffer. */
- X#define YY_BUF_SIZE 16384
- X
- Xtypedef struct yy_buffer_state *YY_BUFFER_STATE;
- X
- Xextern int yyleng;
- Xextern FILE *yyin, *yyout;
- X
- X#ifdef __cplusplus
- Xextern "C" {
- X#endif
- X extern int yywrap YY_PROTO(( void ));
- X#ifdef __cplusplus
- X }
- X#endif
- X
- X#define EOB_ACT_CONTINUE_SCAN 0
- X#define EOB_ACT_END_OF_FILE 1
- X#define EOB_ACT_LAST_MATCH 2
- X
- X/* The funky do-while in the following #define is used to turn the definition
- X * int a single C statement (which needs a semi-colon terminator). This
- X * avoids problems with code like:
- X *
- X * if ( condition_holds )
- X * yyless( 5 );
- X * else
- X * do_something_else();
- X *
- X * Prior to using the do-while the compiler would get upset at the
- X * "else" because it interpreted the "if" statement as being all
- X * done when it reached the ';' after the yyless() call.
- X */
- X
- X/* Return all but the first 'n' matched characters back to the input stream. */
- X
- X#define yyless(n) \
- X do \
- X { \
- X /* Undo effects of setting up yytext. */ \
- X *yy_cp = yy_hold_char; \
- X yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
- X YY_DO_BEFORE_ACTION; /* set up yytext again */ \
- X } \
- X while ( 0 )
- X
- X#define unput(c) yyunput( c, yytext_ptr )
- X
- X
- Xstruct yy_buffer_state
- X {
- X FILE *yy_input_file;
- X
- X char *yy_ch_buf; /* input buffer */
- X char *yy_buf_pos; /* current position in input buffer */
- X
- X /* Size of input buffer in bytes, not including room for EOB
- X * characters.
- X */
- X int yy_buf_size;
- X
- X /* Number of characters read into yy_ch_buf, not including EOB
- X * characters.
- X */
- X int yy_n_chars;
- X
- X /* Whether this is an "interactive" input source; if so, and
- X * if we're using stdio for input, then we want to use getc()
- X * instead of fread(), to make sure we stop fetching input after
- X * each newline.
- X */
- X int yy_is_interactive;
- X
- X /* Whether to try to fill the input buffer when we reach the
- X * end of it.
- X */
- X int yy_fill_buffer;
- X
- X int yy_buffer_status;
- X#define YY_BUFFER_NEW 0
- X#define YY_BUFFER_NORMAL 1
- X /* When an EOF's been seen but there's still some text to process
- X * then we mark the buffer as YY_EOF_PENDING, to indicate that we
- X * shouldn't try reading from the input source any more. We might
- X * still have a bunch of tokens to match, though, because of
- X * possible backing-up.
- X *
- X * When we actually see the EOF, we change the status to "new"
- X * (via yyrestart()), so that the user can continue scanning by
- X * just pointing yyin at a new input file.
- X */
- X#define YY_BUFFER_EOF_PENDING 2
- X };
- X
- Xstatic YY_BUFFER_STATE yy_current_buffer = 0;
- X
- X/* We provide macros for accessing buffer states in case in the
- X * future we want to put the buffer states in a more general
- X * "scanner state".
- X */
- X#define YY_CURRENT_BUFFER yy_current_buffer
- X
- X
- X/* yy_hold_char holds the character lost when yytext is formed. */
- Xstatic char yy_hold_char;
- X
- Xstatic int yy_n_chars; /* number of characters read into yy_ch_buf */
- X
- X
- Xint yyleng;
- X
- X/* Points to current character in buffer. */
- Xstatic char *yy_c_buf_p = (char *) 0;
- Xstatic int yy_init = 1; /* whether we need to initialize */
- Xstatic int yy_start = 0; /* start state number */
- X
- X/* Flag which is used to allow yywrap()'s to do buffer switches
- X * instead of setting up a fresh yyin. A bit of a hack ...
- X */
- Xstatic int yy_did_buffer_switch_on_eof;
- X
- Xstatic void yyunput YY_PROTO(( int c, char *buf_ptr ));
- Xvoid yyrestart YY_PROTO(( FILE *input_file ));
- Xvoid yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer ));
- Xvoid yy_load_buffer_state YY_PROTO(( void ));
- XYY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size ));
- Xvoid yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b ));
- Xvoid yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file ));
- X
- Xstatic int yy_start_stack_ptr = 0;
- Xstatic int yy_start_stack_depth = 0;
- Xstatic int *yy_start_stack = 0;
- Xstatic void yy_push_state YY_PROTO(( int new_state ));
- Xstatic void yy_pop_state YY_PROTO(( void ));
- Xstatic int yy_top_state YY_PROTO(( void ));
- X
- Xstatic void *yy_flex_alloc YY_PROTO(( unsigned int ));
- Xstatic void *yy_flex_realloc YY_PROTO(( void *, unsigned int ));
- Xstatic void yy_flex_free YY_PROTO(( void * ));
- X
- X#define yy_new_buffer yy_create_buffer
- X
- X#define INITIAL 0
- X#define STRING 1
- X#define INCLUDE 2
- X#define ASTCOMMENT 3
- Xtypedef unsigned char YY_CHAR;
- Xtypedef int yy_state_type;
- XFILE *yyin = (FILE *) 0, *yyout = (FILE *) 0;
- Xextern char *yytext;
- X#define yytext_ptr yytext
- X
- X#ifndef yytext_ptr
- Xstatic void yy_flex_strncpy YY_PROTO(( char *, const char *, int ));
- X#endif
- X
- X#ifdef __cplusplus
- Xstatic int yyinput YY_PROTO(( void ));
- X#else
- Xstatic int input YY_PROTO(( void ));
- X#endif
- X
- Xstatic yy_state_type yy_get_previous_state YY_PROTO(( void ));
- Xstatic yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state ));
- Xstatic int yy_get_next_buffer YY_PROTO(( void ));
- Xstatic void yy_fatal_error YY_PROTO(( const char msg[] ));
- X
- X/* Done after the current pattern has been matched and before the
- X * corresponding action - sets up yytext.
- X */
- X#define YY_DO_BEFORE_ACTION \
- X yytext_ptr = yy_bp; \
- X yyleng = yy_cp - yy_bp; \
- X yy_hold_char = *yy_cp; \
- X *yy_cp = '\0'; \
- X yy_c_buf_p = yy_cp;
- X
- X#define YY_END_OF_BUFFER 133
- Xstatic const short int yy_accept[347] =
- X { 0,
- X 0, 0, 0, 0, 0, 0, 0, 0, 133, 132,
- X 129, 131, 130, 89, 109, 14, 101, 81, 80, 132,
- X 97, 98, 69, 91, 86, 90, 87, 72, 122, 122,
- X 84, 88, 73, 85, 74, 83, 101, 99, 132, 100,
- X 70, 101, 101, 101, 101, 101, 101, 101, 101, 101,
- X 101, 101, 101, 101, 101, 101, 78, 71, 79, 68,
- X 128, 72, 115, 113, 112, 115, 114, 19, 17, 18,
- X 19, 19, 108, 107, 106, 108, 129, 130, 60, 0,
- X 0, 0, 0, 0, 0, 0, 101, 76, 75, 77,
- X 0, 0, 63, 94, 95, 82, 96, 55, 0, 118,
- X
- X 104, 92, 119, 116, 122, 0, 122, 0, 56, 58,
- X 93, 59, 57, 109, 0, 127, 66, 101, 101, 101,
- X 101, 101, 101, 101, 28, 101, 101, 101, 101, 101,
- X 101, 36, 101, 101, 101, 101, 101, 101, 101, 101,
- X 101, 101, 101, 67, 61, 0, 0, 128, 0, 103,
- X 111, 110, 114, 17, 0, 16, 0, 15, 107, 105,
- X 0, 0, 0, 0, 7, 8, 0, 0, 0, 0,
- X 123, 0, 123, 0, 0, 62, 0, 118, 118, 0,
- X 119, 116, 0, 120, 117, 64, 65, 20, 101, 101,
- X 101, 101, 101, 101, 101, 101, 101, 101, 101, 34,
- X
- X 101, 101, 38, 101, 101, 101, 101, 101, 101, 101,
- X 101, 101, 101, 101, 101, 101, 101, 101, 102, 103,
- X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- X 0, 124, 125, 0, 0, 0, 120, 118, 0, 121,
- X 117, 21, 101, 24, 23, 101, 101, 101, 101, 30,
- X 31, 101, 101, 35, 101, 39, 101, 101, 101, 101,
- X 101, 101, 101, 101, 101, 101, 101, 52, 101, 101,
- X 0, 3, 4, 0, 0, 0, 0, 0, 11, 0,
- X 0, 0, 126, 0, 22, 25, 101, 101, 101, 101,
- X 33, 101, 101, 101, 42, 101, 101, 101, 101, 101,
- X
- X 101, 101, 50, 101, 101, 54, 0, 5, 6, 9,
- X 0, 0, 0, 13, 101, 101, 29, 32, 37, 101,
- X 41, 43, 44, 45, 46, 47, 101, 49, 101, 101,
- X 2, 10, 0, 12, 101, 27, 101, 48, 101, 101,
- X 1, 26, 40, 51, 53, 0
- X } ;
- X
- Xstatic const int yy_ec[256] =
- X { 0,
- X 1, 1, 1, 1, 1, 1, 1, 1, 2, 3,
- X 1, 4, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- X 14, 15, 16, 17, 18, 19, 20, 21, 22, 22,
- X 22, 22, 22, 22, 22, 23, 23, 24, 25, 26,
- X 27, 28, 29, 30, 31, 31, 31, 31, 32, 33,
- X 9, 9, 9, 9, 9, 34, 9, 9, 9, 9,
- X 9, 9, 9, 9, 35, 9, 9, 9, 9, 9,
- X 36, 37, 38, 39, 9, 30, 40, 41, 42, 43,
- X
- X 44, 45, 46, 47, 48, 9, 49, 50, 51, 52,
- X 53, 54, 9, 55, 56, 57, 58, 59, 60, 61,
- X 62, 63, 64, 65, 66, 67, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1
- X } ;
- X
- Xstatic const int yy_meta[68] =
- X { 0,
- X 1, 1, 1, 1, 2, 2, 3, 2, 4, 2,
- X 2, 5, 2, 2, 2, 2, 2, 2, 2, 2,
- X 6, 6, 7, 2, 2, 2, 2, 2, 3, 2,
- X 7, 7, 7, 4, 4, 2, 3, 2, 2, 6,
- X 6, 7, 7, 7, 6, 4, 4, 4, 4, 4,
- X 4, 8, 4, 4, 8, 4, 8, 4, 8, 4,
- X 8, 4, 4, 2, 2, 2, 2
- X } ;
- X
- Xstatic const short int yy_base[358] =
- X { 0,
- X 0, 66, 66, 72, 78, 85, 91, 95, 554, 555,
- X 97, 555, 550, 525, 555, 103, 0, 524, 80, 513,
- X 555, 555, 522, 62, 555, 94, 94, 55, 143, 105,
- X 555, 555, 92, 521, 102, 555, 113, 555, 544, 555,
- X 519, 75, 490, 95, 70, 82, 88, 491, 100, 490,
- X 498, 111, 479, 488, 486, 491, 555, 109, 165, 555,
- X 171, 57, 555, 555, 555, 172, 167, 555, 178, 555,
- X 530, 508, 555, 184, 555, 515, 190, 555, 555, 192,
- X 490, 150, 136, 485, 477, 479, 0, 555, 555, 555,
- X 518, 186, 555, 555, 555, 555, 555, 555, 510, 211,
- X
- X 555, 555, 230, 247, 264, 198, 555, 0, 501, 555,
- X 555, 555, 500, 555, 489, 555, 555, 474, 467, 479,
- X 466, 481, 468, 474, 460, 461, 458, 458, 461, 458,
- X 455, 0, 146, 459, 153, 457, 160, 175, 461, 454,
- X 134, 106, 459, 555, 555, 252, 491, 287, 490, 555,
- X 555, 555, 220, 236, 497, 555, 475, 555, 271, 555,
- X 457, 170, 458, 445, 555, 185, 457, 446, 457, 453,
- X 555, 483, 482, 227, 0, 555, 272, 555, 279, 309,
- X 555, 555, 237, 294, 284, 555, 555, 0, 440, 452,
- X 447, 435, 221, 449, 447, 443, 435, 441, 444, 0,
- X
- X 430, 434, 0, 435, 432, 421, 423, 425, 432, 418,
- X 416, 416, 428, 418, 422, 426, 428, 417, 555, 555,
- X 418, 420, 420, 415, 409, 417, 417, 409, 414, 411,
- X 412, 555, 555, 314, 443, 316, 322, 555, 325, 328,
- X 555, 0, 405, 0, 0, 396, 404, 393, 400, 0,
- X 0, 394, 391, 0, 395, 0, 390, 390, 387, 399,
- X 389, 393, 398, 397, 107, 386, 391, 0, 379, 391,
- X 382, 555, 555, 388, 377, 386, 386, 371, 555, 377,
- X 382, 414, 555, 413, 0, 0, 372, 373, 378, 369,
- X 0, 376, 362, 366, 0, 374, 363, 363, 320, 294,
- X
- X 296, 288, 0, 276, 273, 0, 276, 555, 555, 555,
- X 265, 266, 266, 555, 246, 246, 0, 0, 0, 240,
- X 0, 0, 0, 0, 0, 0, 226, 0, 223, 215,
- X 555, 555, 168, 555, 100, 0, 46, 0, 52, 32,
- X 555, 0, 0, 0, 0, 555, 351, 359, 367, 372,
- X 379, 387, 395, 401, 404, 406, 409
- X } ;
- X
- Xstatic const short int yy_def[358] =
- X { 0,
- X 346, 1, 347, 347, 348, 348, 349, 349, 346, 346,
- X 346, 346, 346, 346, 346, 346, 350, 346, 346, 351,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 350, 346, 346, 346,
- X 346, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 352, 353, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 350, 346, 346, 346,
- X 346, 354, 346, 346, 346, 346, 346, 346, 346, 346,
- X
- X 346, 346, 346, 346, 346, 346, 346, 355, 346, 346,
- X 346, 346, 346, 346, 351, 346, 346, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 352, 346, 353, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 356, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 355, 346, 346, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 357, 346, 346, 346, 346, 346,
- X 346, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X
- X 350, 350, 350, 350, 350, 350, 346, 346, 346, 346,
- X 346, 346, 346, 346, 350, 350, 350, 350, 350, 350,
- X 350, 350, 350, 350, 350, 350, 350, 350, 350, 350,
- X 346, 346, 346, 346, 350, 350, 350, 350, 350, 350,
- X 346, 350, 350, 350, 350, 0, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346
- X } ;
- X
- Xstatic const short int yy_nxt[623] =
- X { 0,
- X 10, 11, 12, 13, 11, 14, 15, 16, 17, 18,
- X 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,
- X 29, 30, 30, 31, 32, 33, 34, 35, 36, 10,
- X 17, 17, 17, 37, 17, 38, 39, 40, 41, 42,
- X 43, 44, 45, 46, 47, 48, 17, 49, 17, 50,
- X 17, 17, 17, 17, 51, 52, 53, 54, 55, 56,
- X 17, 17, 17, 57, 58, 59, 60, 61, 64, 101,
- X 61, 150, 65, 67, 64, 345, 67, 94, 65, 69,
- X 70, 102, 69, 102, 71, 62, 69, 70, 95, 69,
- X 89, 71, 74, 75, 344, 74, 74, 75, 77, 74,
- X
- X 343, 77, 66, 72, 80, 76, 90, 80, 66, 76,
- X 72, 96, 99, 124, 100, 100, 100, 109, 110, 114,
- X 97, 98, 125, 103, 115, 105, 105, 105, 112, 113,
- X 118, 126, 119, 127, 121, 144, 106, 129, 107, 107,
- X 130, 122, 128, 342, 132, 81, 82, 123, 106, 301,
- X 83, 133, 84, 216, 107, 217, 85, 136, 137, 302,
- X 86, 103, 107, 104, 104, 105, 146, 138, 153, 146,
- X 139, 153, 148, 145, 106, 148, 107, 107, 151, 154,
- X 166, 214, 154, 151, 147, 159, 106, 167, 159, 215,
- X 149, 77, 107, 80, 77, 202, 80, 173, 205, 162,
- X
- X 107, 163, 203, 108, 164, 208, 174, 174, 152, 206,
- X 165, 341, 151, 183, 210, 183, 151, 222, 184, 184,
- X 184, 153, 209, 151, 153, 223, 151, 226, 151, 211,
- X 151, 100, 100, 100, 81, 82, 227, 154, 233, 83,
- X 154, 84, 177, 178, 178, 85, 175, 234, 234, 86,
- X 179, 179, 179, 146, 177, 178, 146, 184, 184, 184,
- X 178, 180, 181, 181, 340, 103, 339, 104, 104, 105,
- X 338, 147, 159, 180, 181, 159, 246, 247, 106, 181,
- X 182, 182, 103, 337, 105, 105, 105, 236, 148, 236,
- X 106, 148, 237, 237, 237, 106, 182, 107, 107, 179,
- X
- X 179, 179, 336, 335, 182, 334, 149, 106, 333, 332,
- X 106, 238, 238, 107, 184, 184, 184, 241, 241, 331,
- X 330, 107, 106, 238, 239, 233, 239, 329, 238, 240,
- X 240, 240, 328, 241, 282, 282, 237, 237, 237, 327,
- X 326, 241, 237, 237, 237, 240, 240, 240, 240, 240,
- X 240, 63, 63, 63, 63, 63, 63, 63, 63, 68,
- X 68, 68, 68, 68, 68, 68, 68, 73, 73, 73,
- X 73, 73, 73, 73, 73, 87, 325, 87, 87, 87,
- X 91, 91, 91, 91, 91, 91, 91, 155, 155, 155,
- X 155, 155, 155, 155, 155, 157, 157, 157, 157, 157,
- X
- X 157, 157, 157, 172, 324, 172, 172, 323, 172, 185,
- X 185, 235, 235, 284, 284, 284, 322, 321, 320, 319,
- X 318, 317, 316, 315, 283, 233, 314, 313, 312, 311,
- X 310, 309, 308, 307, 306, 305, 304, 303, 300, 299,
- X 298, 297, 296, 295, 294, 293, 292, 291, 290, 289,
- X 288, 287, 286, 285, 283, 281, 280, 279, 278, 277,
- X 276, 275, 274, 273, 272, 271, 270, 269, 268, 267,
- X 266, 265, 264, 263, 262, 261, 260, 259, 258, 257,
- X 256, 255, 254, 253, 252, 251, 250, 249, 248, 245,
- X 244, 243, 242, 232, 232, 231, 230, 229, 228, 225,
- X
- X 224, 221, 158, 156, 220, 219, 218, 213, 212, 207,
- X 204, 201, 200, 199, 198, 197, 196, 195, 194, 193,
- X 192, 191, 190, 189, 188, 92, 187, 186, 176, 171,
- X 170, 169, 168, 161, 160, 158, 156, 143, 142, 141,
- X 140, 135, 134, 131, 120, 117, 116, 111, 93, 92,
- X 88, 79, 78, 346, 9, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346
- X } ;
- X
- Xstatic const short int yy_chk[623] =
- X { 0,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- X 1, 1, 1, 1, 1, 1, 1, 2, 3, 28,
- X 2, 62, 3, 4, 4, 340, 4, 24, 4, 5,
- X 5, 28, 5, 62, 5, 2, 6, 6, 24, 6,
- X 19, 6, 7, 7, 339, 7, 8, 8, 11, 8,
- X
- X 337, 11, 3, 5, 16, 7, 19, 16, 4, 8,
- X 6, 26, 27, 45, 27, 27, 27, 33, 33, 37,
- X 26, 26, 45, 30, 37, 30, 30, 30, 35, 35,
- X 42, 46, 42, 46, 44, 58, 30, 47, 30, 30,
- X 47, 44, 46, 335, 49, 16, 16, 44, 30, 265,
- X 16, 49, 16, 142, 30, 142, 16, 52, 52, 265,
- X 16, 29, 30, 29, 29, 29, 59, 52, 67, 59,
- X 52, 67, 61, 58, 29, 61, 29, 29, 66, 69,
- X 83, 141, 69, 66, 59, 74, 29, 83, 74, 141,
- X 61, 77, 29, 80, 77, 133, 80, 92, 135, 82,
- X
- X 29, 82, 133, 29, 82, 137, 92, 92, 66, 135,
- X 82, 333, 66, 106, 138, 106, 66, 162, 106, 106,
- X 106, 153, 137, 66, 153, 162, 66, 166, 66, 138,
- X 66, 100, 100, 100, 80, 80, 166, 154, 174, 80,
- X 154, 80, 100, 100, 100, 80, 92, 174, 174, 80,
- X 103, 103, 103, 146, 100, 100, 146, 183, 183, 183,
- X 100, 103, 103, 103, 330, 104, 329, 104, 104, 104,
- X 327, 146, 159, 103, 103, 159, 193, 193, 104, 103,
- X 104, 104, 105, 320, 105, 105, 105, 177, 148, 177,
- X 104, 148, 177, 177, 177, 105, 104, 105, 105, 179,
- X
- X 179, 179, 316, 315, 104, 313, 148, 105, 312, 311,
- X 179, 179, 179, 105, 184, 184, 184, 185, 185, 307,
- X 305, 105, 179, 179, 180, 234, 180, 304, 179, 180,
- X 180, 180, 302, 185, 234, 234, 236, 236, 236, 301,
- X 300, 185, 237, 237, 237, 239, 239, 239, 240, 240,
- X 240, 347, 347, 347, 347, 347, 347, 347, 347, 348,
- X 348, 348, 348, 348, 348, 348, 348, 349, 349, 349,
- X 349, 349, 349, 349, 349, 350, 299, 350, 350, 350,
- X 351, 351, 351, 351, 351, 351, 351, 352, 352, 352,
- X 352, 352, 352, 352, 352, 353, 353, 353, 353, 353,
- X
- X 353, 353, 353, 354, 298, 354, 354, 297, 354, 355,
- X 355, 356, 356, 357, 357, 357, 296, 294, 293, 292,
- X 290, 289, 288, 287, 284, 282, 281, 280, 278, 277,
- X 276, 275, 274, 271, 270, 269, 267, 266, 264, 263,
- X 262, 261, 260, 259, 258, 257, 255, 253, 252, 249,
- X 248, 247, 246, 243, 235, 231, 230, 229, 228, 227,
- X 226, 225, 224, 223, 222, 221, 218, 217, 216, 215,
- X 214, 213, 212, 211, 210, 209, 208, 207, 206, 205,
- X 204, 202, 201, 199, 198, 197, 196, 195, 194, 192,
- X 191, 190, 189, 173, 172, 170, 169, 168, 167, 164,
- X
- X 163, 161, 157, 155, 149, 147, 143, 140, 139, 136,
- X 134, 131, 130, 129, 128, 127, 126, 125, 124, 123,
- X 122, 121, 120, 119, 118, 115, 113, 109, 99, 91,
- X 86, 85, 84, 81, 76, 72, 71, 56, 55, 54,
- X 53, 51, 50, 48, 43, 41, 39, 34, 23, 20,
- X 18, 14, 13, 9, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346, 346, 346, 346, 346, 346, 346, 346, 346,
- X 346, 346
- X } ;
- X
- Xstatic yy_state_type yy_last_accepting_state;
- Xstatic char *yy_last_accepting_cpos;
- X
- X/* The intent behind this definition is that it'll catch
- X * any uses of REJECT which flex missed.
- X */
- X#define REJECT reject_used_but_not_detected
- X#define yymore() yymore_used_but_not_detected
- X#define YY_MORE_ADJ 0
- Xchar *yytext;
- X# line 1 "src/ansic2latex.l"
- X/* $Id: ansic2latex.l,v 3.0 1994/01/15 17:07:01 joke Rel $ */
- X# line 6 "src/ansic2latex.l"
- X#include "defs.h"
- X
- X/* Macros after this point can all be overridden by user definitions in
- X * section 1.
- X */
- X
- X#ifdef YY_MALLOC_DECL
- XYY_MALLOC_DECL
- X#else
- X#if __STDC__
- X#ifndef __cplusplus
- X#include <stdlib.h>
- X#endif
- X#else
- X/* Just try to get by without declaring the routines. This will fail
- X * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int)
- X * or sizeof(void*) != sizeof(int).
- X */
- X#endif
- X#endif
- X
- X/* Amount of stuff to slurp up with each read. */
- X#ifndef YY_READ_BUF_SIZE
- X#define YY_READ_BUF_SIZE 8192
- X#endif
- X
- X/* Copy whatever the last rule matched to the standard output. */
- X
- X#ifndef ECHO
- X/* This used to be an fputs(), but since the string might contain NUL's,
- X * we now use fwrite().
- X */
- X#define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
- X#endif
- X
- X/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
- X * is returned in "result".
- X */
- X#ifndef YY_INPUT
- X#define YY_INPUT(buf,result,max_size) \
- X if ( yy_current_buffer->yy_is_interactive ) \
- X { \
- X int c = getc( yyin ); \
- X result = c == EOF ? 0 : 1; \
- X buf[0] = (char) c; \
- X } \
- X else if ( ((result = fread( buf, 1, max_size, yyin )) == 0) \
- X && ferror( yyin ) ) \
- X YY_FATAL_ERROR( "input in flex scanner failed" );
- X#endif
- X
- X/* No semi-colon after return; correct usage is to write "yyterminate();" -
- X * we don't want an extra ';' after the "return" because that will cause
- X * some compilers to complain about unreachable statements.
- X */
- X#ifndef yyterminate
- X#define yyterminate() return YY_NULL
- X#endif
- X
- X/* Number of entries by which start-condition stack grows. */
- X#ifndef YY_START_STACK_INCR
- X#define YY_START_STACK_INCR 25
- X#endif
- X
- X/* Report a fatal error. */
- X#ifndef YY_FATAL_ERROR
- X#define YY_FATAL_ERROR(msg) yy_fatal_error( msg )
- X#endif
- X
- X/* Default declaration of generated scanner - a define so the user can
- X * easily add parameters.
- X */
- X#ifndef YY_DECL
- X#define YY_DECL int yylex YY_PROTO(( void ))
- X#endif
- X
- X/* Code executed at the beginning of each rule, after yytext and yyleng
- X * have been set up.
- X */
- X#ifndef YY_USER_ACTION
- X#define YY_USER_ACTION
- X#endif
- X
- X/* Code executed at the end of each rule. */
- X#ifndef YY_BREAK
- X#define YY_BREAK break;
- X#endif
- X
- XYY_DECL
- X {
- X register yy_state_type yy_current_state;
- X register char *yy_cp, *yy_bp;
- X register int yy_act;
- X
- X# line 9 "src/ansic2latex.l"
- X
- X INIT;
- X
- X
- X if ( yy_init )
- X {
- X#ifdef YY_USER_INIT
- X YY_USER_INIT;
- X#endif
- X
- X if ( ! yy_start )
- X yy_start = 1; /* first start state */
- X
- X if ( ! yyin )
- X yyin = stdin;
- X
- X if ( ! yyout )
- X yyout = stdout;
- X
- X if ( yy_current_buffer )
- X yy_init_buffer( yy_current_buffer, yyin );
- X else
- X yy_current_buffer =
- X yy_create_buffer( yyin, YY_BUF_SIZE );
- X
- X yy_load_buffer_state();
- X
- X yy_init = 0;
- X }
- X
- X while ( 1 ) /* loops until end-of-file is reached */
- X {
- X yy_cp = yy_c_buf_p;
- X
- X /* Support of yytext. */
- X *yy_cp = yy_hold_char;
- X
- X /* yy_bp points to the position in yy_ch_buf of the start of
- X * the current run.
- X */
- X yy_bp = yy_cp;
- X
- X yy_current_state = yy_start;
- X if ( yy_bp[-1] == '\n' )
- X ++yy_current_state;
- Xyy_match:
- X do
- X {
- X register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
- 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 >= 347 )
- 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_cp;
- X }
- X while ( yy_base[yy_current_state] != 555 );
- X
- Xyy_find_action:
- X yy_act = yy_accept[yy_current_state];
- X
- X YY_DO_BEFORE_ACTION;
- X
- X
- Xdo_action: /* This label is used only to access EOF actions. */
- X
- X
- X switch ( yy_act )
- X { /* beginning of action switch */
- X case 0: /* must back up */
- X /* undo the effects of YY_DO_BEFORE_ACTION */
- X *yy_cp = yy_hold_char;
- X yy_cp = yy_last_accepting_cpos;
- X yy_current_state = yy_last_accepting_state;
- X goto yy_find_action;
- X
- Xcase 1:
- XYY_USER_ACTION
- X# line 12 "src/ansic2latex.l"
- X{ CPP; BEGIN (INCLUDE); }
- X YY_BREAK
- Xcase 2:
- X# line 15 "src/ansic2latex.l"
- Xcase 3:
- X# line 16 "src/ansic2latex.l"
- Xcase 4:
- X# line 17 "src/ansic2latex.l"
- Xcase 5:
- X# line 18 "src/ansic2latex.l"
- Xcase 6:
- X# line 19 "src/ansic2latex.l"
- Xcase 7:
- X# line 20 "src/ansic2latex.l"
- Xcase 8:
- X# line 21 "src/ansic2latex.l"
- Xcase 9:
- X# line 22 "src/ansic2latex.l"
- Xcase 10:
- X# line 23 "src/ansic2latex.l"
- Xcase 11:
- X# line 24 "src/ansic2latex.l"
- Xcase 12:
- X# line 25 "src/ansic2latex.l"
- Xcase 13:
- XYY_USER_ACTION
- X# line 25 "src/ansic2latex.l"
- XCPP;
- X YY_BREAK
- X /* cpp unary # and binary ## commands */
- Xcase 14:
- XYY_USER_ACTION
- X# line 28 "src/ansic2latex.l"
- XCPP;
- X YY_BREAK
- Xcase 15:
- X*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- Xyy_c_buf_p = yy_cp -= 1;
- XYY_DO_BEFORE_ACTION; /* set up yytext again */
- XYY_USER_ACTION
- X# line 31 "src/ansic2latex.l"
- X{ OUT ("$<$"); FONT (string_font);
- X SUB (yytext+1); OUT ("}$>$");
- X input(); INIT; }
- X YY_BREAK
- Xcase 16:
- X*yy_cp = yy_hold_char; /* undo effects of setting up yytext */
- Xyy_c_buf_p = yy_cp -= 1;
- XYY_DO_BEFORE_ACTION; /* set up yytext again */
- XYY_USER_ACTION
- X# line 34 "src/ansic2latex.l"
- X{ OUT ("\""); FONT (string_font);
- X SUB (yytext+1); OUT ("}\"");
- X input(); INIT; }
- X YY_BREAK
- Xcase 17:
- XYY_USER_ACTION
- X# line 37 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 18:
- XYY_USER_ACTION
- X# line 38 "src/ansic2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 19:
- XYY_USER_ACTION
- X# line 39 "src/ansic2latex.l"
- X{ REPARSE; INIT; }
- X YY_BREAK
- X /* from: gcc-2.2/c-parse.gperf */
- Xcase 20:
- X# line 44 "src/ansic2latex.l"
- Xcase 21:
- X# line 45 "src/ansic2latex.l"
- Xcase 22:
- X# line 46 "src/ansic2latex.l"
- Xcase 23:
- X# line 47 "src/ansic2latex.l"
- Xcase 24:
- X# line 48 "src/ansic2latex.l"
- Xcase 25:
- X# line 49 "src/ansic2latex.l"
- Xcase 26:
- X# line 50 "src/ansic2latex.l"
- Xcase 27:
- X# line 51 "src/ansic2latex.l"
- Xcase 28:
- X# line 52 "src/ansic2latex.l"
- Xcase 29:
- X# line 53 "src/ansic2latex.l"
- Xcase 30:
- X# line 54 "src/ansic2latex.l"
- Xcase 31:
- X# line 55 "src/ansic2latex.l"
- Xcase 32:
- X# line 56 "src/ansic2latex.l"
- Xcase 33:
- X# line 57 "src/ansic2latex.l"
- Xcase 34:
- X# line 58 "src/ansic2latex.l"
- Xcase 35:
- X# line 59 "src/ansic2latex.l"
- Xcase 36:
- X# line 60 "src/ansic2latex.l"
- Xcase 37:
- X# line 61 "src/ansic2latex.l"
- Xcase 38:
- X# line 62 "src/ansic2latex.l"
- Xcase 39:
- X# line 63 "src/ansic2latex.l"
- Xcase 40:
- X# line 64 "src/ansic2latex.l"
- Xcase 41:
- X# line 65 "src/ansic2latex.l"
- Xcase 42:
- X# line 66 "src/ansic2latex.l"
- Xcase 43:
- X# line 67 "src/ansic2latex.l"
- Xcase 44:
- X# line 68 "src/ansic2latex.l"
- Xcase 45:
- X# line 69 "src/ansic2latex.l"
- Xcase 46:
- X# line 70 "src/ansic2latex.l"
- Xcase 47:
- X# line 71 "src/ansic2latex.l"
- Xcase 48:
- X# line 72 "src/ansic2latex.l"
- Xcase 49:
- X# line 73 "src/ansic2latex.l"
- Xcase 50:
- X# line 74 "src/ansic2latex.l"
- Xcase 51:
- X# line 75 "src/ansic2latex.l"
- Xcase 52:
- X# line 76 "src/ansic2latex.l"
- Xcase 53:
- X# line 77 "src/ansic2latex.l"
- Xcase 54:
- XYY_USER_ACTION
- X# line 77 "src/ansic2latex.l"
- XKEY;
- X YY_BREAK
- Xcase 55:
- XYY_USER_ACTION
- X# line 80 "src/ansic2latex.l"
- XSYM ("rightarrow");
- X YY_BREAK
- Xcase 56:
- XYY_USER_ACTION
- X# line 81 "src/ansic2latex.l"
- XSYM ("ll");
- X YY_BREAK
- Xcase 57:
- XYY_USER_ACTION
- X# line 82 "src/ansic2latex.l"
- XSYM ("gg");
- X YY_BREAK
- Xcase 58:
- XYY_USER_ACTION
- X# line 83 "src/ansic2latex.l"
- XSYM ("leq");
- X YY_BREAK
- Xcase 59:
- XYY_USER_ACTION
- X# line 84 "src/ansic2latex.l"
- XSYM ("geq");
- X YY_BREAK
- Xcase 60:
- XYY_USER_ACTION
- X# line 85 "src/ansic2latex.l"
- XSYM ("neq");
- X YY_BREAK
- Xcase 61:
- XYY_USER_ACTION
- X# line 86 "src/ansic2latex.l"
- XSYM ("mid\\mid");
- X YY_BREAK
- Xcase 62:
- XYY_USER_ACTION
- X# line 87 "src/ansic2latex.l"
- XSYM ("ldots");
- X YY_BREAK
- Xcase 63:
- XYY_USER_ACTION
- X# line 88 "src/ansic2latex.l"
- XSYM ("ast=");
- X YY_BREAK
- Xcase 64:
- XYY_USER_ACTION
- X# line 89 "src/ansic2latex.l"
- XSYM ("ll=");
- X YY_BREAK
- Xcase 65:
- XYY_USER_ACTION
- X# line 90 "src/ansic2latex.l"
- XSYM ("gg=");
- X YY_BREAK
- Xcase 66:
- XYY_USER_ACTION
- X# line 91 "src/ansic2latex.l"
- XSYM ("vee=");
- X YY_BREAK
- Xcase 67:
- XYY_USER_ACTION
- X# line 92 "src/ansic2latex.l"
- XSYM ("mid=");
- X YY_BREAK
- Xcase 68:
- XYY_USER_ACTION
- X# line 93 "src/ansic2latex.l"
- XSYM ("sim");
- X YY_BREAK
- Xcase 69:
- XYY_USER_ACTION
- X# line 94 "src/ansic2latex.l"
- XSYM ("ast");
- X YY_BREAK
- Xcase 70:
- XYY_USER_ACTION
- X# line 95 "src/ansic2latex.l"
- XSYM ("wedge");
- X YY_BREAK
- Xcase 71:
- XYY_USER_ACTION
- X# line 96 "src/ansic2latex.l"
- XSYM ("mid");
- X YY_BREAK
- Xcase 72:
- XYY_USER_ACTION
- X# line 97 "src/ansic2latex.l"
- XOUT ("$/$");
- X YY_BREAK
- Xcase 73:
- XYY_USER_ACTION
- X# line 98 "src/ansic2latex.l"
- XOUT ("$<$");
- X YY_BREAK
- Xcase 74:
- XYY_USER_ACTION
- X# line 99 "src/ansic2latex.l"
- XOUT ("$>$");
- X YY_BREAK
- Xcase 75:
- XYY_USER_ACTION
- X# line 100 "src/ansic2latex.l"
- XOUT ("\\&\\&");
- X YY_BREAK
- Xcase 76:
- XYY_USER_ACTION
- X# line 101 "src/ansic2latex.l"
- XOUT ("\\%=");
- X YY_BREAK
- Xcase 77:
- XYY_USER_ACTION
- X# line 102 "src/ansic2latex.l"
- XOUT ("\\&=");
- X YY_BREAK
- Xcase 78:
- XYY_USER_ACTION
- X# line 103 "src/ansic2latex.l"
- XOUT ("\\{");
- X YY_BREAK
- Xcase 79:
- XYY_USER_ACTION
- X# line 104 "src/ansic2latex.l"
- XOUT ("\\}");
- X YY_BREAK
- Xcase 80:
- XYY_USER_ACTION
- X# line 105 "src/ansic2latex.l"
- XOUT ("\\&");
- X YY_BREAK
- Xcase 81:
- XYY_USER_ACTION
- X# line 106 "src/ansic2latex.l"
- XOUT ("\\%");
- X YY_BREAK
- Xcase 82:
- XYY_USER_ACTION
- X# line 107 "src/ansic2latex.l"
- XOUT ("-{}-");
- X YY_BREAK
- Xcase 83:
- X# line 109 "src/ansic2latex.l"
- Xcase 84:
- X# line 110 "src/ansic2latex.l"
- Xcase 85:
- X# line 111 "src/ansic2latex.l"
- Xcase 86:
- X# line 112 "src/ansic2latex.l"
- Xcase 87:
- X# line 113 "src/ansic2latex.l"
- Xcase 88:
- X# line 114 "src/ansic2latex.l"
- Xcase 89:
- X# line 115 "src/ansic2latex.l"
- Xcase 90:
- X# line 116 "src/ansic2latex.l"
- Xcase 91:
- X# line 117 "src/ansic2latex.l"
- Xcase 92:
- X# line 118 "src/ansic2latex.l"
- Xcase 93:
- X# line 119 "src/ansic2latex.l"
- Xcase 94:
- X# line 120 "src/ansic2latex.l"
- Xcase 95:
- X# line 121 "src/ansic2latex.l"
- Xcase 96:
- X# line 122 "src/ansic2latex.l"
- Xcase 97:
- X# line 123 "src/ansic2latex.l"
- Xcase 98:
- X# line 124 "src/ansic2latex.l"
- Xcase 99:
- X# line 125 "src/ansic2latex.l"
- Xcase 100:
- X# line 126 "src/ansic2latex.l"
- X ECHO;
- X /* identifiers: may contain $ chars */
- Xcase 101:
- XYY_USER_ACTION
- X# line 129 "src/ansic2latex.l"
- XSUB (yytext);
- X YY_BREAK
- X /* 1. Asterisk comments mini scanner */
- X /* 1.1. Curly brace comment */
- Xcase 102:
- XYY_USER_ACTION
- X# line 134 "src/ansic2latex.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 103:
- XYY_USER_ACTION
- X# line 141 "src/ansic2latex.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 104:
- XYY_USER_ACTION
- X# line 146 "src/ansic2latex.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 105:
- XYY_USER_ACTION
- X# line 155 "src/ansic2latex.l"
- X{ INIT; OUT ("$\\ast$/}"); }
- X YY_BREAK
- Xcase 106:
- XYY_USER_ACTION
- X# line 156 "src/ansic2latex.l"
- X{ OUT ("}\\mbox{}\\\\\n"); FONT (comment_font); }
- X YY_BREAK
- Xcase 107:
- XYY_USER_ACTION
- X# line 157 "src/ansic2latex.l"
- XIND;
- X YY_BREAK
- Xcase 108:
- XYY_USER_ACTION
- X# line 158 "src/ansic2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 109:
- XYY_USER_ACTION
- X# line 161 "src/ansic2latex.l"
- X{ BEGIN (STRING);
- X FONT (string_font); OUT ("\""); }
- X YY_BREAK
- Xcase 110:
- XYY_USER_ACTION
- X# line 163 "src/ansic2latex.l"
- XOUT ("$\\backslash\\backslash$");
- X YY_BREAK
- Xcase 111:
- XYY_USER_ACTION
- X# line 164 "src/ansic2latex.l"
- X{ OUT ("$\\backslash$"); SUB (yytext+1); }
- X YY_BREAK
- Xcase 112:
- XYY_USER_ACTION
- X# line 165 "src/ansic2latex.l"
- X{ INIT; OUT ("\"}"); }
- X YY_BREAK
- Xcase 113:
- XYY_USER_ACTION
- X# line 166 "src/ansic2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 114:
- XYY_USER_ACTION
- X# line 167 "src/ansic2latex.l"
- XIND;
- X YY_BREAK
- Xcase 115:
- XYY_USER_ACTION
- X# line 168 "src/ansic2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 116:
- XYY_USER_ACTION
- X# line 170 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 117:
- XYY_USER_ACTION
- X# line 172 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 118:
- X# line 175 "src/ansic2latex.l"
- Xcase 119:
- X# line 176 "src/ansic2latex.l"
- Xcase 120:
- X# line 177 "src/ansic2latex.l"
- Xcase 121:
- XYY_USER_ACTION
- X# line 177 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 122:
- XYY_USER_ACTION
- X# line 179 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 123:
- X# line 182 "src/ansic2latex.l"
- Xcase 124:
- X# line 183 "src/ansic2latex.l"
- Xcase 125:
- X# line 184 "src/ansic2latex.l"
- Xcase 126:
- XYY_USER_ACTION
- X# line 184 "src/ansic2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 127:
- XYY_USER_ACTION
- X# line 186 "src/ansic2latex.l"
- XOUT ("$\\backslash$\\\\\n");
- X YY_BREAK
- Xcase 128:
- XYY_USER_ACTION
- X# line 187 "src/ansic2latex.l"
- XIND;
- X YY_BREAK
- Xcase 129:
- XYY_USER_ACTION
- X# line 188 "src/ansic2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 130:
- XYY_USER_ACTION
- X# line 189 "src/ansic2latex.l"
- XOUT ("\\newpage\n");
- X YY_BREAK
- Xcase 131:
- XYY_USER_ACTION
- X# line 190 "src/ansic2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 132:
- XYY_USER_ACTION
- X# line 191 "src/ansic2latex.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):
- 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 >= 347 )
- 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 >= 347 )
- 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 == 346);
- 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 191 "src/ansic2latex.l"
- X
- X
- X#include "main.c"
- END_OF_FILE
- if test 54213 -ne `wc -c <'src/ansic2latex.c'`; then
- echo shar: \"'src/ansic2latex.c'\" unpacked with wrong size!
- fi
- # end of 'src/ansic2latex.c'
- fi
- echo shar: End of archive 2 \(of 8\).
- cp /dev/null ark2isdone
- 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...
-