home *** CD-ROM | disk | FTP | other *** search
- From: joke@germany.eu.net (Joerg Heitkoetter)
- Newsgroups: comp.sources.misc
- Subject: v44i012: c++2latex - A set of LaTeX converters for the whole C family, v3.0, Part03/08
- Date: 7 Aug 1994 16:43:00 -0500
- Organization: Sterling Software
- Sender: kent@sparky.sterling.com
- Approved: kent@sparky.sterling.com
- Message-ID: <323kh4$glo@sparky.sterling.com>
- X-Md4-Signature: f88f3d3deda68f3c612fa856dd906784
-
- Submitted-by: joke@germany.eu.net (Joerg Heitkoetter)
- Posting-number: Volume 44, Issue 12
- Archive-name: c++2latex/part03
- 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/objc.m src/krc2latex.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 3 (of 8)."'
- if test -f 'docs/objc.m' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'docs/objc.m'\"
- else
- echo shar: Extracting \"'docs/objc.m'\" \(349 characters\)
- sed "s/^X//" >'docs/objc.m' <<'END_OF_FILE'
- X// Same for a Float object, but for the obvious difference that
- X// it works with floats.
- X// Note polymorphism -- methods have same names as in the Int class.
- X
- X@implementation Float: Object
- X{
- X float value;
- X}
- X
- X+ makeRoomFor: (float) x
- X{
- X self = [super new];
- X value = x;
- X return self;
- X}
- X
- X- report
- X{
- X printf("%4.1f", value);
- X return self;
- X}
- X
- X@end
- END_OF_FILE
- if test 349 -ne `wc -c <'docs/objc.m'`; then
- echo shar: \"'docs/objc.m'\" unpacked with wrong size!
- fi
- # end of 'docs/objc.m'
- fi
- if test -f 'src/krc2latex.c' -a "${1}" != "-c" ; then
- echo shar: Will not clobber existing file \"'src/krc2latex.c'\"
- else
- echo shar: Extracting \"'src/krc2latex.c'\" \(53535 characters\)
- sed "s/^X//" >'src/krc2latex.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 130
- Xstatic const short int yy_accept[341] =
- X { 0,
- X 0, 0, 0, 0, 0, 0, 0, 0, 130, 129,
- X 126, 128, 127, 86, 106, 129, 98, 78, 77, 129,
- X 94, 95, 66, 88, 83, 87, 84, 69, 119, 119,
- X 81, 85, 70, 82, 71, 80, 98, 96, 129, 97,
- X 67, 98, 98, 98, 98, 98, 98, 98, 98, 98,
- X 98, 98, 98, 98, 98, 98, 75, 68, 76, 65,
- X 125, 69, 112, 110, 109, 112, 111, 18, 16, 17,
- X 18, 18, 105, 104, 103, 105, 126, 127, 57, 0,
- X 0, 0, 0, 0, 0, 0, 98, 73, 72, 74,
- X 0, 0, 60, 91, 92, 79, 93, 52, 0, 115,
- X
- X 101, 89, 116, 113, 119, 0, 119, 0, 53, 55,
- X 90, 56, 54, 106, 0, 124, 63, 98, 98, 98,
- X 98, 98, 98, 98, 26, 98, 98, 98, 98, 98,
- X 98, 34, 98, 98, 98, 98, 98, 98, 98, 98,
- X 98, 98, 98, 64, 58, 0, 0, 125, 0, 100,
- X 108, 107, 111, 16, 0, 15, 0, 14, 104, 102,
- X 0, 0, 0, 0, 7, 8, 0, 0, 0, 0,
- X 120, 0, 120, 0, 0, 59, 0, 115, 115, 0,
- X 116, 113, 0, 117, 114, 61, 62, 19, 98, 98,
- X 98, 98, 98, 98, 98, 98, 98, 98, 98, 32,
- X
- X 98, 98, 36, 98, 98, 98, 98, 98, 98, 98,
- X 98, 98, 98, 98, 98, 98, 98, 99, 100, 0,
- X 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- X 121, 122, 0, 0, 0, 117, 115, 0, 118, 114,
- X 20, 98, 23, 22, 98, 98, 98, 28, 29, 98,
- X 98, 33, 98, 37, 98, 98, 98, 98, 98, 98,
- X 98, 98, 98, 98, 49, 98, 98, 0, 3, 4,
- X 0, 0, 0, 0, 0, 11, 0, 0, 0, 123,
- X 0, 21, 98, 98, 98, 98, 31, 98, 98, 98,
- X 40, 98, 98, 98, 98, 98, 98, 47, 98, 98,
- X
- X 51, 0, 5, 6, 9, 0, 0, 0, 13, 98,
- X 98, 27, 30, 35, 98, 39, 41, 42, 43, 44,
- X 98, 46, 98, 98, 2, 10, 0, 12, 98, 25,
- X 98, 45, 98, 98, 1, 24, 38, 48, 50, 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[352] =
- X { 0,
- X 0, 66, 66, 72, 78, 85, 91, 95, 548, 549,
- X 97, 549, 544, 519, 549, 103, 0, 518, 80, 507,
- X 549, 549, 516, 62, 549, 94, 94, 55, 143, 105,
- X 549, 549, 92, 515, 102, 549, 113, 549, 538, 549,
- X 513, 75, 484, 95, 70, 82, 88, 485, 100, 484,
- X 492, 111, 473, 482, 480, 485, 549, 109, 165, 549,
- X 171, 57, 549, 549, 549, 172, 167, 549, 178, 549,
- X 524, 502, 549, 184, 549, 509, 190, 549, 549, 192,
- X 484, 150, 136, 479, 471, 473, 0, 549, 549, 549,
- X 512, 186, 549, 549, 549, 549, 549, 549, 504, 211,
- X
- X 549, 549, 230, 247, 264, 198, 549, 0, 495, 549,
- X 549, 549, 494, 549, 483, 549, 549, 468, 461, 473,
- X 460, 475, 462, 468, 454, 455, 452, 452, 455, 452,
- X 449, 0, 146, 453, 153, 451, 440, 175, 454, 447,
- X 134, 106, 452, 549, 549, 221, 484, 252, 483, 549,
- X 549, 549, 220, 271, 490, 549, 468, 549, 287, 549,
- X 450, 211, 451, 438, 549, 185, 450, 439, 450, 446,
- X 549, 476, 475, 227, 0, 549, 272, 549, 279, 309,
- X 549, 549, 294, 297, 299, 549, 549, 0, 433, 445,
- X 440, 428, 425, 441, 439, 435, 427, 433, 436, 0,
- X
- X 422, 426, 0, 427, 424, 413, 415, 425, 411, 409,
- X 409, 421, 411, 415, 419, 421, 410, 549, 549, 411,
- X 413, 413, 408, 402, 410, 410, 402, 407, 404, 405,
- X 549, 549, 314, 436, 316, 319, 549, 322, 325, 549,
- X 0, 398, 0, 0, 398, 387, 394, 0, 0, 388,
- X 385, 0, 389, 0, 384, 384, 381, 384, 388, 393,
- X 392, 107, 381, 386, 0, 374, 386, 377, 549, 549,
- X 383, 372, 381, 381, 366, 549, 372, 369, 399, 549,
- X 371, 0, 304, 305, 310, 301, 0, 308, 294, 298,
- X 0, 283, 279, 253, 262, 263, 261, 0, 252, 255,
- X
- X 0, 240, 549, 549, 549, 233, 234, 231, 549, 207,
- X 203, 0, 0, 0, 214, 0, 0, 0, 0, 0,
- X 193, 0, 174, 162, 549, 549, 162, 549, 100, 0,
- X 46, 0, 52, 32, 549, 0, 0, 0, 0, 549,
- X 357, 365, 373, 378, 385, 393, 401, 407, 410, 412,
- X 415
- X } ;
- X
- Xstatic const short int yy_def[352] =
- X { 0,
- X 340, 1, 341, 341, 342, 342, 343, 343, 340, 340,
- X 340, 340, 340, 340, 340, 340, 344, 340, 340, 345,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 344, 340, 340, 340,
- X 340, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 346, 347, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 344, 340, 340, 340,
- X 340, 348, 340, 340, 340, 340, 340, 340, 340, 340,
- X
- X 340, 340, 340, 340, 340, 340, 340, 349, 340, 340,
- X 340, 340, 340, 340, 345, 340, 340, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 346, 340, 347, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 350, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 349, 340, 340, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 351, 340, 340, 340, 340, 340, 340,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X
- X 344, 340, 340, 340, 340, 340, 340, 340, 340, 344,
- X 344, 344, 344, 344, 344, 344, 344, 344, 344, 344,
- X 344, 344, 344, 344, 340, 340, 340, 340, 344, 344,
- X 344, 344, 344, 344, 340, 344, 344, 344, 344, 0,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340
- X } ;
- X
- Xstatic const short int yy_nxt[617] =
- 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, 339, 67, 94, 65, 69,
- X 70, 102, 69, 102, 71, 62, 69, 70, 95, 69,
- X 89, 71, 74, 75, 338, 74, 74, 75, 77, 74,
- X
- X 337, 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, 336, 132, 81, 82, 123, 106, 296,
- X 83, 133, 84, 215, 107, 216, 85, 136, 137, 297,
- X 86, 103, 107, 104, 104, 105, 146, 138, 153, 146,
- X 139, 153, 148, 145, 106, 148, 107, 107, 151, 154,
- X 166, 213, 154, 151, 147, 159, 106, 167, 159, 214,
- X 149, 77, 107, 80, 77, 202, 80, 173, 205, 162,
- X
- X 107, 163, 203, 108, 164, 335, 174, 174, 152, 206,
- X 165, 334, 151, 183, 209, 183, 151, 333, 184, 184,
- X 184, 153, 146, 151, 153, 146, 151, 225, 151, 210,
- X 151, 100, 100, 100, 81, 82, 226, 332, 232, 83,
- X 147, 84, 177, 178, 178, 85, 175, 233, 233, 86,
- X 179, 179, 179, 148, 177, 178, 148, 331, 221, 330,
- X 178, 180, 181, 181, 329, 103, 222, 104, 104, 105,
- X 328, 149, 154, 180, 181, 154, 327, 326, 106, 181,
- X 182, 182, 103, 325, 105, 105, 105, 235, 159, 235,
- X 106, 159, 236, 236, 236, 106, 182, 107, 107, 179,
- X
- X 179, 179, 324, 323, 182, 322, 321, 106, 320, 319,
- X 106, 237, 237, 107, 184, 184, 184, 184, 184, 184,
- X 318, 107, 106, 237, 238, 232, 238, 317, 237, 239,
- X 239, 239, 240, 240, 279, 279, 236, 236, 236, 236,
- X 236, 236, 239, 239, 239, 239, 239, 239, 240, 316,
- X 315, 314, 313, 312, 311, 310, 240, 63, 63, 63,
- X 63, 63, 63, 63, 63, 68, 68, 68, 68, 68,
- X 68, 68, 68, 73, 73, 73, 73, 73, 73, 73,
- X 73, 87, 280, 87, 87, 87, 91, 91, 91, 91,
- X 91, 91, 91, 155, 155, 155, 155, 155, 155, 155,
- X
- X 155, 157, 157, 157, 157, 157, 157, 157, 157, 172,
- X 232, 172, 172, 309, 172, 185, 185, 234, 234, 281,
- X 281, 281, 308, 307, 306, 305, 304, 303, 302, 301,
- X 300, 299, 298, 295, 294, 293, 292, 291, 290, 289,
- X 288, 287, 286, 285, 284, 283, 282, 280, 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, 247,
- X 246, 245, 244, 243, 242, 241, 231, 231, 230, 229,
- X 228, 227, 224, 223, 220, 158, 156, 219, 218, 217,
- X
- X 212, 211, 208, 207, 204, 201, 200, 199, 198, 197,
- X 196, 195, 194, 193, 192, 191, 190, 189, 188, 92,
- X 187, 186, 176, 171, 170, 169, 168, 161, 160, 158,
- X 156, 143, 142, 141, 140, 135, 134, 131, 120, 117,
- X 116, 111, 93, 92, 88, 79, 78, 340, 9, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340
- X } ;
- X
- Xstatic const short int yy_chk[617] =
- 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, 334, 4, 24, 4, 5,
- X 5, 28, 5, 62, 5, 2, 6, 6, 24, 6,
- X 19, 6, 7, 7, 333, 7, 8, 8, 11, 8,
- X
- X 331, 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, 329, 49, 16, 16, 44, 30, 262,
- X 16, 49, 16, 142, 30, 142, 16, 52, 52, 262,
- 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, 327, 92, 92, 66, 135,
- X 82, 324, 66, 106, 138, 106, 66, 323, 106, 106,
- X 106, 153, 146, 66, 153, 146, 66, 166, 66, 138,
- X 66, 100, 100, 100, 80, 80, 166, 321, 174, 80,
- X 146, 80, 100, 100, 100, 80, 92, 174, 174, 80,
- X 103, 103, 103, 148, 100, 100, 148, 315, 162, 311,
- X 100, 103, 103, 103, 310, 104, 162, 104, 104, 104,
- X 308, 148, 154, 103, 103, 154, 307, 306, 104, 103,
- X 104, 104, 105, 302, 105, 105, 105, 177, 159, 177,
- X 104, 159, 177, 177, 177, 105, 104, 105, 105, 179,
- X
- X 179, 179, 300, 299, 104, 297, 296, 105, 295, 294,
- X 179, 179, 179, 105, 183, 183, 183, 184, 184, 184,
- X 293, 105, 179, 179, 180, 233, 180, 292, 179, 180,
- X 180, 180, 185, 185, 233, 233, 235, 235, 235, 236,
- X 236, 236, 238, 238, 238, 239, 239, 239, 185, 290,
- X 289, 288, 286, 285, 284, 283, 185, 341, 341, 341,
- X 341, 341, 341, 341, 341, 342, 342, 342, 342, 342,
- X 342, 342, 342, 343, 343, 343, 343, 343, 343, 343,
- X 343, 344, 281, 344, 344, 344, 345, 345, 345, 345,
- X 345, 345, 345, 346, 346, 346, 346, 346, 346, 346,
- X
- X 346, 347, 347, 347, 347, 347, 347, 347, 347, 348,
- X 279, 348, 348, 278, 348, 349, 349, 350, 350, 351,
- X 351, 351, 277, 275, 274, 273, 272, 271, 268, 267,
- X 266, 264, 263, 261, 260, 259, 258, 257, 256, 255,
- X 253, 251, 250, 247, 246, 245, 242, 234, 230, 229,
- X 228, 227, 226, 225, 224, 223, 222, 221, 220, 217,
- X 216, 215, 214, 213, 212, 211, 210, 209, 208, 207,
- X 206, 205, 204, 202, 201, 199, 198, 197, 196, 195,
- X 194, 193, 192, 191, 190, 189, 173, 172, 170, 169,
- X 168, 167, 164, 163, 161, 157, 155, 149, 147, 143,
- X
- X 140, 139, 137, 136, 134, 131, 130, 129, 128, 127,
- X 126, 125, 124, 123, 122, 121, 120, 119, 118, 115,
- X 113, 109, 99, 91, 86, 85, 84, 81, 76, 72,
- X 71, 56, 55, 54, 53, 51, 50, 48, 43, 41,
- X 39, 34, 23, 20, 18, 14, 13, 9, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X
- X 340, 340, 340, 340, 340, 340, 340, 340, 340, 340,
- X 340, 340, 340, 340, 340, 340
- 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/krc2latex.l"
- X/* $Id: krc2latex.l,v 3.0 1994/01/15 17:07:07 joke Rel $ */
- X# line 6 "src/krc2latex.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/krc2latex.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 >= 341 )
- 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] != 549 );
- 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/krc2latex.l"
- X{ CPP; BEGIN (INCLUDE); }
- X YY_BREAK
- Xcase 2:
- X# line 15 "src/krc2latex.l"
- Xcase 3:
- X# line 16 "src/krc2latex.l"
- Xcase 4:
- X# line 17 "src/krc2latex.l"
- Xcase 5:
- X# line 18 "src/krc2latex.l"
- Xcase 6:
- X# line 19 "src/krc2latex.l"
- Xcase 7:
- X# line 20 "src/krc2latex.l"
- Xcase 8:
- X# line 21 "src/krc2latex.l"
- Xcase 9:
- X# line 22 "src/krc2latex.l"
- Xcase 10:
- X# line 23 "src/krc2latex.l"
- Xcase 11:
- X# line 24 "src/krc2latex.l"
- Xcase 12:
- X# line 25 "src/krc2latex.l"
- Xcase 13:
- XYY_USER_ACTION
- X# line 25 "src/krc2latex.l"
- XCPP;
- X YY_BREAK
- Xcase 14:
- 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 28 "src/krc2latex.l"
- X{ OUT ("$<$"); FONT (string_font);
- X SUB (yytext+1); OUT ("}$>$");
- X input(); INIT; }
- 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/krc2latex.l"
- X{ OUT ("\""); FONT (string_font);
- X SUB (yytext+1); OUT ("}\"");
- X input(); INIT; }
- X YY_BREAK
- Xcase 16:
- XYY_USER_ACTION
- X# line 34 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 17:
- XYY_USER_ACTION
- X# line 35 "src/krc2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 18:
- XYY_USER_ACTION
- X# line 36 "src/krc2latex.l"
- X{ REPARSE; INIT; }
- X YY_BREAK
- X /* from: gcc-2.2/c-parse.gperf */
- Xcase 19:
- X# line 41 "src/krc2latex.l"
- Xcase 20:
- X# line 42 "src/krc2latex.l"
- Xcase 21:
- X# line 43 "src/krc2latex.l"
- Xcase 22:
- X# line 44 "src/krc2latex.l"
- Xcase 23:
- X# line 45 "src/krc2latex.l"
- Xcase 24:
- X# line 46 "src/krc2latex.l"
- Xcase 25:
- X# line 47 "src/krc2latex.l"
- Xcase 26:
- X# line 48 "src/krc2latex.l"
- Xcase 27:
- X# line 49 "src/krc2latex.l"
- Xcase 28:
- X# line 50 "src/krc2latex.l"
- Xcase 29:
- X# line 51 "src/krc2latex.l"
- Xcase 30:
- X# line 52 "src/krc2latex.l"
- Xcase 31:
- X# line 53 "src/krc2latex.l"
- Xcase 32:
- X# line 54 "src/krc2latex.l"
- Xcase 33:
- X# line 55 "src/krc2latex.l"
- Xcase 34:
- X# line 56 "src/krc2latex.l"
- Xcase 35:
- X# line 57 "src/krc2latex.l"
- Xcase 36:
- X# line 58 "src/krc2latex.l"
- Xcase 37:
- X# line 59 "src/krc2latex.l"
- Xcase 38:
- X# line 60 "src/krc2latex.l"
- Xcase 39:
- X# line 61 "src/krc2latex.l"
- Xcase 40:
- X# line 62 "src/krc2latex.l"
- Xcase 41:
- X# line 63 "src/krc2latex.l"
- Xcase 42:
- X# line 64 "src/krc2latex.l"
- Xcase 43:
- X# line 65 "src/krc2latex.l"
- Xcase 44:
- X# line 66 "src/krc2latex.l"
- Xcase 45:
- X# line 67 "src/krc2latex.l"
- Xcase 46:
- X# line 68 "src/krc2latex.l"
- Xcase 47:
- X# line 69 "src/krc2latex.l"
- Xcase 48:
- X# line 70 "src/krc2latex.l"
- Xcase 49:
- X# line 71 "src/krc2latex.l"
- Xcase 50:
- X# line 72 "src/krc2latex.l"
- Xcase 51:
- XYY_USER_ACTION
- X# line 72 "src/krc2latex.l"
- XKEY;
- X YY_BREAK
- Xcase 52:
- XYY_USER_ACTION
- X# line 75 "src/krc2latex.l"
- XSYM ("rightarrow");
- X YY_BREAK
- Xcase 53:
- XYY_USER_ACTION
- X# line 76 "src/krc2latex.l"
- XSYM ("ll");
- X YY_BREAK
- Xcase 54:
- XYY_USER_ACTION
- X# line 77 "src/krc2latex.l"
- XSYM ("gg");
- X YY_BREAK
- Xcase 55:
- XYY_USER_ACTION
- X# line 78 "src/krc2latex.l"
- XSYM ("leq");
- X YY_BREAK
- Xcase 56:
- XYY_USER_ACTION
- X# line 79 "src/krc2latex.l"
- XSYM ("geq");
- X YY_BREAK
- Xcase 57:
- XYY_USER_ACTION
- X# line 80 "src/krc2latex.l"
- XSYM ("neq");
- X YY_BREAK
- Xcase 58:
- XYY_USER_ACTION
- X# line 81 "src/krc2latex.l"
- XSYM ("mid\\mid");
- X YY_BREAK
- Xcase 59:
- XYY_USER_ACTION
- X# line 82 "src/krc2latex.l"
- XSYM ("ldots");
- X YY_BREAK
- Xcase 60:
- XYY_USER_ACTION
- X# line 83 "src/krc2latex.l"
- XSYM ("ast=");
- X YY_BREAK
- Xcase 61:
- XYY_USER_ACTION
- X# line 84 "src/krc2latex.l"
- XSYM ("ll=");
- X YY_BREAK
- Xcase 62:
- XYY_USER_ACTION
- X# line 85 "src/krc2latex.l"
- XSYM ("gg=");
- X YY_BREAK
- Xcase 63:
- XYY_USER_ACTION
- X# line 86 "src/krc2latex.l"
- XSYM ("vee=");
- X YY_BREAK
- Xcase 64:
- XYY_USER_ACTION
- X# line 87 "src/krc2latex.l"
- XSYM ("mid=");
- X YY_BREAK
- Xcase 65:
- XYY_USER_ACTION
- X# line 88 "src/krc2latex.l"
- XSYM ("sim");
- X YY_BREAK
- Xcase 66:
- XYY_USER_ACTION
- X# line 89 "src/krc2latex.l"
- XSYM ("ast");
- X YY_BREAK
- Xcase 67:
- XYY_USER_ACTION
- X# line 90 "src/krc2latex.l"
- XSYM ("wedge");
- X YY_BREAK
- Xcase 68:
- XYY_USER_ACTION
- X# line 91 "src/krc2latex.l"
- XSYM ("mid");
- X YY_BREAK
- Xcase 69:
- XYY_USER_ACTION
- X# line 92 "src/krc2latex.l"
- XOUT ("$/$");
- X YY_BREAK
- Xcase 70:
- XYY_USER_ACTION
- X# line 93 "src/krc2latex.l"
- XOUT ("$<$");
- X YY_BREAK
- Xcase 71:
- XYY_USER_ACTION
- X# line 94 "src/krc2latex.l"
- XOUT ("$>$");
- X YY_BREAK
- Xcase 72:
- XYY_USER_ACTION
- X# line 95 "src/krc2latex.l"
- XOUT ("\\&\\&");
- X YY_BREAK
- Xcase 73:
- XYY_USER_ACTION
- X# line 96 "src/krc2latex.l"
- XOUT ("\\%=");
- X YY_BREAK
- Xcase 74:
- XYY_USER_ACTION
- X# line 97 "src/krc2latex.l"
- XOUT ("\\&=");
- X YY_BREAK
- Xcase 75:
- XYY_USER_ACTION
- X# line 98 "src/krc2latex.l"
- XOUT ("\\{");
- X YY_BREAK
- Xcase 76:
- XYY_USER_ACTION
- X# line 99 "src/krc2latex.l"
- XOUT ("\\}");
- X YY_BREAK
- Xcase 77:
- XYY_USER_ACTION
- X# line 100 "src/krc2latex.l"
- XOUT ("\\&");
- X YY_BREAK
- Xcase 78:
- XYY_USER_ACTION
- X# line 101 "src/krc2latex.l"
- XOUT ("\\%");
- X YY_BREAK
- Xcase 79:
- XYY_USER_ACTION
- X# line 102 "src/krc2latex.l"
- XOUT ("-{}-");
- X YY_BREAK
- Xcase 80:
- X# line 104 "src/krc2latex.l"
- Xcase 81:
- X# line 105 "src/krc2latex.l"
- Xcase 82:
- X# line 106 "src/krc2latex.l"
- Xcase 83:
- X# line 107 "src/krc2latex.l"
- Xcase 84:
- X# line 108 "src/krc2latex.l"
- Xcase 85:
- X# line 109 "src/krc2latex.l"
- Xcase 86:
- X# line 110 "src/krc2latex.l"
- Xcase 87:
- X# line 111 "src/krc2latex.l"
- Xcase 88:
- X# line 112 "src/krc2latex.l"
- Xcase 89:
- X# line 113 "src/krc2latex.l"
- Xcase 90:
- X# line 114 "src/krc2latex.l"
- Xcase 91:
- X# line 115 "src/krc2latex.l"
- Xcase 92:
- X# line 116 "src/krc2latex.l"
- Xcase 93:
- X# line 117 "src/krc2latex.l"
- Xcase 94:
- X# line 118 "src/krc2latex.l"
- Xcase 95:
- X# line 119 "src/krc2latex.l"
- Xcase 96:
- X# line 120 "src/krc2latex.l"
- Xcase 97:
- XYY_USER_ACTION
- X# line 120 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 98:
- XYY_USER_ACTION
- X# line 123 "src/krc2latex.l"
- XSUB (yytext);
- X YY_BREAK
- X /* 1. Asterisk comments mini scanner */
- X /* 1.1. Curly brace comment */
- Xcase 99:
- XYY_USER_ACTION
- X# line 128 "src/krc2latex.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 100:
- XYY_USER_ACTION
- X# line 135 "src/krc2latex.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 101:
- XYY_USER_ACTION
- X# line 140 "src/krc2latex.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 102:
- XYY_USER_ACTION
- X# line 149 "src/krc2latex.l"
- X{ INIT; OUT ("$\\ast$/}"); }
- X YY_BREAK
- Xcase 103:
- XYY_USER_ACTION
- X# line 150 "src/krc2latex.l"
- X{ OUT ("}\\mbox{}\\\\\n"); FONT (comment_font); }
- X YY_BREAK
- Xcase 104:
- XYY_USER_ACTION
- X# line 151 "src/krc2latex.l"
- XIND;
- X YY_BREAK
- Xcase 105:
- XYY_USER_ACTION
- X# line 152 "src/krc2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 106:
- XYY_USER_ACTION
- X# line 155 "src/krc2latex.l"
- X{ BEGIN (STRING);
- X FONT (string_font); OUT ("\""); }
- X YY_BREAK
- Xcase 107:
- XYY_USER_ACTION
- X# line 157 "src/krc2latex.l"
- XOUT ("$\\backslash\\backslash$");
- X YY_BREAK
- Xcase 108:
- XYY_USER_ACTION
- X# line 158 "src/krc2latex.l"
- X{ OUT ("$\\backslash$"); SUB (yytext+1); }
- X YY_BREAK
- Xcase 109:
- XYY_USER_ACTION
- X# line 159 "src/krc2latex.l"
- X{ INIT; OUT ("\"}"); }
- X YY_BREAK
- Xcase 110:
- XYY_USER_ACTION
- X# line 160 "src/krc2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 111:
- XYY_USER_ACTION
- X# line 161 "src/krc2latex.l"
- XIND;
- X YY_BREAK
- Xcase 112:
- XYY_USER_ACTION
- X# line 162 "src/krc2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 113:
- XYY_USER_ACTION
- X# line 165 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 114:
- XYY_USER_ACTION
- X# line 167 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 115:
- X# line 170 "src/krc2latex.l"
- Xcase 116:
- X# line 171 "src/krc2latex.l"
- Xcase 117:
- X# line 172 "src/krc2latex.l"
- Xcase 118:
- XYY_USER_ACTION
- X# line 172 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 119:
- XYY_USER_ACTION
- X# line 174 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 120:
- X# line 177 "src/krc2latex.l"
- Xcase 121:
- X# line 178 "src/krc2latex.l"
- Xcase 122:
- X# line 179 "src/krc2latex.l"
- Xcase 123:
- XYY_USER_ACTION
- X# line 179 "src/krc2latex.l"
- XSUB (yytext);
- X YY_BREAK
- Xcase 124:
- XYY_USER_ACTION
- X# line 181 "src/krc2latex.l"
- XOUT ("$\\backslash$\\\\\n");
- X YY_BREAK
- Xcase 125:
- XYY_USER_ACTION
- X# line 182 "src/krc2latex.l"
- XIND;
- X YY_BREAK
- Xcase 126:
- XYY_USER_ACTION
- X# line 183 "src/krc2latex.l"
- XECHO;
- X YY_BREAK
- Xcase 127:
- XYY_USER_ACTION
- X# line 184 "src/krc2latex.l"
- XOUT ("\\newpage\n");
- X YY_BREAK
- Xcase 128:
- XYY_USER_ACTION
- X# line 185 "src/krc2latex.l"
- XOUT ("\\mbox{}\\\\\n");
- X YY_BREAK
- Xcase 129:
- XYY_USER_ACTION
- X# line 186 "src/krc2latex.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 >= 341 )
- 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 >= 341 )
- 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 == 340);
- 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 186 "src/krc2latex.l"
- X
- X
- X#include "main.c"
- END_OF_FILE
- if test 53535 -ne `wc -c <'src/krc2latex.c'`; then
- echo shar: \"'src/krc2latex.c'\" unpacked with wrong size!
- fi
- # end of 'src/krc2latex.c'
- fi
- echo shar: End of archive 3 \(of 8\).
- cp /dev/null ark3isdone
- 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...
-