Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
libparse.cc File Reference
#include <stdio.h>
#include "factory/globaldefs.h"
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <ctype.h>
#include "kernel/mod2.h"
#include "Singular/subexpr.h"
#include "Singular/grammar.h"
#include "Singular/ipshell.h"
#include "Singular/ipid.h"
#include "Singular/tok.h"
#include "misc/options.h"
#include "omalloc/omalloc.h"
#include "Singular/libparse.h"

Go to the source code of this file.

Data Structures

struct  YY_BUFFER_STATE
 

Macros

#define yy_create_buffer   yylp_create_buffer
 
#define yy_delete_buffer   yylp_delete_buffer
 
#define yy_scan_buffer   yylp_scan_buffer
 
#define yy_scan_string   yylp_scan_string
 
#define yy_scan_bytes   yylp_scan_bytes
 
#define yy_flex_debug   yylp_flex_debug
 
#define yy_init_buffer   yylp_init_buffer
 
#define yy_flush_buffer   yylp_flush_buffer
 
#define yy_load_buffer_state   yylp_load_buffer_state
 
#define yy_switch_to_buffer   yylp_switch_to_buffer
 
#define yyin   yylpin
 
#define yyleng   yylpleng
 
#define yylex   yylplex
 
#define yyout   yylpout
 
#define yyrestart   yylprestart
 
#define yytext   yylptext
 
#define yywrap   yylpwrap
 
#define FLEX_SCANNER
 
#define YY_FLEX_MAJOR_VERSION   2
 
#define YY_FLEX_MINOR_VERSION   5
 
#define YY_USE_PROTOS
 
#define YY_USE_CONST
 
#define yyconst   const
 
#define YY_PROTO(proto)   proto
 
#define YY_NULL   0
 
#define YY_SC_TO_UI(c)   ((unsigned int) (unsigned char) c)
 
#define BEGIN   yy_start = 1 + 2 *
 
#define YY_START   ((yy_start - 1) / 2)
 
#define YYSTATE   YY_START
 
#define YY_STATE_EOF(state)   (YY_END_OF_BUFFER + state + 1)
 
#define YY_NEW_FILE   yyrestart( yyin )
 
#define YY_END_OF_BUFFER_CHAR   0
 
#define YY_BUF_SIZE   16384
 
#define EOB_ACT_CONTINUE_SCAN   0
 
#define EOB_ACT_END_OF_FILE   1
 
#define EOB_ACT_LAST_MATCH   2
 
#define yyless(n)
 
#define unput(c)   yyunput( c, yytext_ptr )
 
#define YY_BUFFER_NEW   0
 
#define YY_BUFFER_NORMAL   1
 
#define YY_BUFFER_EOF_PENDING   2
 
#define YY_CURRENT_BUFFER   yy_current_buffer
 
#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )
 
#define yy_new_buffer   yy_create_buffer
 
#define yy_set_interactive(is_interactive)
 
#define yy_set_bol(at_bol)
 
#define YY_AT_BOL()   (yy_current_buffer->yy_at_bol)
 
#define yytext_ptr   yytext
 
#define YY_DO_BEFORE_ACTION
 
#define YY_NUM_RULES   96
 
#define YY_END_OF_BUFFER   97
 
#define REJECT   reject_used_but_not_detected
 
#define yymore()   (yy_more_flag = 1)
 
#define YY_MORE_ADJ   yy_more_len
 
#define YY_RESTORE_YY_MORE_OFFSET
 
#define INITIAL   0
 
#define YY_SKIP_YYWRAP
 
#define pi   IDPROC(h0)
 
#define SET_DEF_END(mode, pi, p)   if ( mode == LOAD_LIB) pi->data.s.def_end = p;
 
#define SET_HELP_START(mode, pi, p)   if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;}
 
#define SET_HELP_END(mode, pi, p)
 
#define SET_BODY_START(mode, pi, l, p)
 
#define SET_BODY_END(mode, pi, p)
 
#define SET_EXAMPLE_START(mode, pi, l, p)
 
#define SET_PROC_END(mode, pi, p)
 
#define ROTATE_RIGHT(c)   if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1;
 
#define IncrCheckSum(c)
 
#define YY_DECL
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_USER_INIT
 
#define header   1
 
#define help   2
 
#define libcmd   3
 
#define libcmd2   4
 
#define pdef   5
 
#define phead   6
 
#define poldhelp   7
 
#define phelp   8
 
#define pbody   9
 
#define pstr   10
 
#define pexample   11
 
#define pestr   12
 
#define string   13
 
#define comment   14
 
#define info   15
 
#define category   16
 
#define url   17
 
#define version   18
 
#define YY_NO_PUSH_STATE   1
 
#define YY_NO_POP_STATE   1
 
#define YY_NO_TOP_STATE   1
 
#define YY_READ_BUF_SIZE   8192
 
#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )
 
#define yyterminate()   return YY_NULL
 
#define YY_START_STACK_INCR   25
 
#define YY_FATAL_ERROR(msg)   yy_fatal_error( msg )
 
#define YY_USER_ACTION
 
#define YY_BREAK   break;
 
#define YY_RULE_SETUP
 
#define YY_EXIT_FAILURE   2
 
#define yyless(n)
 

Typedefs

typedef unsigned int yy_size_t
 
typedef unsigned char YY_CHAR
 
typedef int yy_state_type
 

Enumerations

enum  lib_cmds {
  LP_NONE, LP_INFO, LP_CATEGORY, LP_URL,
  LP_VERSION
}
 

Functions

void yyrestart YY_PROTO ((FILE *input_file))
 
void yy_switch_to_buffer YY_PROTO ((YY_BUFFER_STATE new_buffer))
 
void yy_load_buffer_state YY_PROTO ((void))
 
YY_BUFFER_STATE yy_create_buffer YY_PROTO ((FILE *file, int size))
 
void yy_delete_buffer YY_PROTO ((YY_BUFFER_STATE b))
 
void yy_init_buffer YY_PROTO ((YY_BUFFER_STATE b, FILE *file))
 
YY_BUFFER_STATE yy_scan_buffer YY_PROTO ((char *base, yy_size_t size))
 
YY_BUFFER_STATE yy_scan_string YY_PROTO ((yyconst char *yy_str))
 
YY_BUFFER_STATE yy_scan_bytes YY_PROTO ((yyconst char *bytes, int len))
 
static void *yy_flex_alloc YY_PROTO ((yy_size_t))
 
static void *yy_flex_realloc YY_PROTO ((void *, yy_size_t))
 
static void yy_flex_free YY_PROTO ((void *))
 
static yy_state_type yy_try_NUL_trans YY_PROTO ((yy_state_type current_state))
 
static void yy_fatal_error YY_PROTO ((yyconst char msg[]))
 
int libread (FILE *f, char *buf, int max_size)
 
int current_pos (int i)
 
void print_version (lp_modes mode, char *p)
 
void copy_string (lp_modes mode)
 
void make_version (char *p, int what)
 
int yylpwrap ()
 
static void yyunput YY_PROTO ((int c, char *buf_ptr))
 
 if (yy_init)
 
 while (1)
 
static int yy_get_next_buffer ()
 
static yy_state_type yy_get_previous_state ()
 
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state)
 
static void yyunput (int c, register char *yy_bp)
 
static int yyinput ()
 
void yyrestart (FILE *input_file)
 
void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer)
 
void yy_load_buffer_state (void)
 
YY_BUFFER_STATE yy_create_buffer (FILE *file, int size)
 
void yy_delete_buffer (YY_BUFFER_STATE b)
 
int isatty YY_PROTO ((int))
 
void yy_init_buffer (YY_BUFFER_STATE b, FILE *file)
 
void yy_flush_buffer (YY_BUFFER_STATE b)
 
YY_BUFFER_STATE yy_scan_buffer (char *base, yy_size_t size)
 
YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str)
 
YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes, int len)
 
static void yy_fatal_error (yyconst char msg[])
 
static void * yy_flex_alloc (yy_size_t size)
 
static void * yy_flex_realloc (void *ptr, yy_size_t size)
 
static void yy_flex_free (void *ptr)
 
void reinit_yylp ()
 
void print_init ()
 

Variables

EXTERN_VAR int yyleng
 
EXTERN_VAR FILE * yyin = (FILE *) 0
 
EXTERN_VAR FILE * yyout = (FILE *) 0
 
STATIC_VAR YY_BUFFER_STATE yy_current_buffer = 0
 
STATIC_VAR char yy_hold_char
 
STATIC_VAR int yy_n_chars
 
STATIC_VAR char * yy_c_buf_p = (char *) 0
 
STATIC_VAR int yy_init = 1
 
STATIC_VAR int yy_start = 0
 
STATIC_VAR int yy_did_buffer_switch_on_eof
 
EXTERN_VAR char * yytext
 
static yyconst short int yy_accept [485]
 
static yyconst int yy_ec [256]
 
static yyconst int yy_meta [53]
 
static yyconst short int yy_base [533]
 
static yyconst short int yy_def [533]
 
static yyconst short int yy_nxt [2253]
 
static yyconst short int yy_chk [2253]
 
STATIC_VAR yy_state_type yy_last_accepting_state
 
STATIC_VAR char * yy_last_accepting_cpos
 
STATIC_VAR int yy_more_flag = 0
 
STATIC_VAR int yy_more_len = 0
 
VAR int brace1 = 0
 
VAR int brace2 = 0
 
VAR int brace3 = 0
 
VAR int quote = 0
 
VAR int offset = 0
 
VAR BOOLEAN p_static = FALSE
 
VAR int old_state = 0
 
VAR lib_cmds last_cmd = LP_NONE
 
VAR char libnamebuf [1024]
 
VAR char * text_buffer =NULL
 
VAR long string_start
 
VAR char * yylp_buffer_start
 
VAR int yylplineno = 1
 
VAR int lpverbose = 0
 
VAR int check = 0
 
VAR int texinfo_out = 0
 
VAR int found_info =0
 
VAR int found_cat =0
 
VAR int found_version =0
 
VAR int found_oldhelp = 0
 
VAR int found_proc_in_proc = 0
 
const char * yylp_errlist []
 
VAR int yylp_errno = 0
 
VAR idhdl h0
 
VAR idhdl h_top
 
EXTERN_VAR libstackv library_stack
 
STATIC_VAR unsigned long help_chksum
 
 YY_DECL
 
register char * yy_cp
 
register char * yy_bp
 
register int yy_act
 

Data Structure Documentation

◆ yy_buffer_state

struct yy_buffer_state

Definition at line 164 of file libparse.cc.

Data Fields
int yy_at_bol
char * yy_buf_pos
yy_size_t yy_buf_size
int yy_buffer_status
char * yy_ch_buf
int yy_fill_buffer
FILE * yy_input_file
int yy_is_interactive
int yy_is_our_buffer
int yy_n_chars

Macro Definition Documentation

◆ BEGIN

#define BEGIN   yy_start = 1 + 2 *

Definition at line 99 of file libparse.cc.

◆ category

#define category   16

Definition at line 1258 of file libparse.cc.

◆ comment

#define comment   14

Definition at line 1254 of file libparse.cc.

◆ ECHO

#define ECHO   (void) fwrite( yytext, yyleng, 1, yyout )

Definition at line 1343 of file libparse.cc.

◆ EOB_ACT_CONTINUE_SCAN

#define EOB_ACT_CONTINUE_SCAN   0

Definition at line 124 of file libparse.cc.

◆ EOB_ACT_END_OF_FILE

#define EOB_ACT_END_OF_FILE   1

Definition at line 125 of file libparse.cc.

◆ EOB_ACT_LAST_MATCH

#define EOB_ACT_LAST_MATCH   2

Definition at line 126 of file libparse.cc.

◆ FLEX_SCANNER

#define FLEX_SCANNER

Definition at line 25 of file libparse.cc.

◆ header

#define header   1

Definition at line 1228 of file libparse.cc.

◆ help

#define help   2

Definition at line 1230 of file libparse.cc.

◆ IncrCheckSum

#define IncrCheckSum (   c)
Value:
do \
{ \
ROTATE_RIGHT(help_chksum); \
help_chksum += c; \
help_chksum &= 0xffff; \
} \
while(0)
STATIC_VAR unsigned long help_chksum
Definition: libparse.cc:1153

Definition at line 1191 of file libparse.cc.

◆ info

#define info   15

Definition at line 1256 of file libparse.cc.

◆ INITIAL

#define INITIAL   0

Definition at line 1051 of file libparse.cc.

◆ libcmd

#define libcmd   3

Definition at line 1232 of file libparse.cc.

◆ libcmd2

#define libcmd2   4

Definition at line 1234 of file libparse.cc.

◆ pbody

#define pbody   9

Definition at line 1244 of file libparse.cc.

◆ pdef

#define pdef   5

Definition at line 1236 of file libparse.cc.

◆ pestr

#define pestr   12

Definition at line 1250 of file libparse.cc.

◆ pexample

#define pexample   11

Definition at line 1248 of file libparse.cc.

◆ phead

#define phead   6

Definition at line 1238 of file libparse.cc.

◆ phelp

#define phelp   8

Definition at line 1242 of file libparse.cc.

◆ pi

#define pi   IDPROC(h0)

Definition at line 1145 of file libparse.cc.

◆ poldhelp

#define poldhelp   7

Definition at line 1240 of file libparse.cc.

◆ pstr

#define pstr   10

Definition at line 1246 of file libparse.cc.

◆ REJECT

#define REJECT   reject_used_but_not_detected

Definition at line 1043 of file libparse.cc.

◆ ROTATE_RIGHT

#define ROTATE_RIGHT (   c)    if ((c) & 01) (c) = ((c) >>1) + 0x8000; else (c) >>= 1;

Definition at line 1190 of file libparse.cc.

◆ SET_BODY_END

#define SET_BODY_END (   mode,
  pi,
  p 
)
Value:
if ( mode == LOAD_LIB) \
{ \
pi->data.s.body_end = p-1; \
pi->data.s.proc_end = p-1; \
}
int p
Definition: cfModGcd.cc:4019

Definition at line 1169 of file libparse.cc.

◆ SET_BODY_START

#define SET_BODY_START (   mode,
  pi,
  l,
  p 
)
Value:
if ( mode == LOAD_LIB) \
{ \
pi->data.s.body_lineno = l; \
pi->data.s.body_start = p; \
}
int p
Definition: cfModGcd.cc:4019
int l
Definition: cfEzgcd.cc:93

Definition at line 1163 of file libparse.cc.

◆ SET_DEF_END

#define SET_DEF_END (   mode,
  pi,
  p 
)    if ( mode == LOAD_LIB) pi->data.s.def_end = p;

Definition at line 1155 of file libparse.cc.

◆ SET_EXAMPLE_START

#define SET_EXAMPLE_START (   mode,
  pi,
  l,
  p 
)
Value:
if ( mode == LOAD_LIB) \
{ \
pi->data.s.example_lineno = l; \
pi->data.s.example_start = p; \
}
int p
Definition: cfModGcd.cc:4019
int l
Definition: cfEzgcd.cc:93

Definition at line 1176 of file libparse.cc.

◆ SET_HELP_END

#define SET_HELP_END (   mode,
  pi,
  p 
)
Value:
if ( mode == LOAD_LIB) {pi->data.s.help_end = p; \
pi->data.s.help_chksum = help_chksum;}
#define pi
Definition: libparse.cc:1145
int p
Definition: cfModGcd.cc:4019
STATIC_VAR unsigned long help_chksum
Definition: libparse.cc:1153

Definition at line 1159 of file libparse.cc.

◆ SET_HELP_START

#define SET_HELP_START (   mode,
  pi,
  p 
)    if ( mode == LOAD_LIB) {pi->data.s.help_start = p; help_chksum = 0;}

Definition at line 1157 of file libparse.cc.

◆ SET_PROC_END

#define SET_PROC_END (   mode,
  pi,
  p 
)
Value:
if ( mode == LOAD_LIB) \
{ \
pi->data.s.proc_end = p-1; \
if(pi->data.s.body_end==0) \
pi->data.s.body_end = p-1; \
}
#define pi
Definition: libparse.cc:1145
int p
Definition: cfModGcd.cc:4019

Definition at line 1182 of file libparse.cc.

◆ string

#define string   13

Definition at line 1252 of file libparse.cc.

◆ unput

#define unput (   c)    yyunput( c, yytext_ptr )

Definition at line 155 of file libparse.cc.

◆ url

#define url   17

Definition at line 1260 of file libparse.cc.

◆ version

#define version   18

Definition at line 1262 of file libparse.cc.

◆ YY_AT_BOL

#define YY_AT_BOL ( )    (yy_current_buffer->yy_at_bol)

Definition at line 282 of file libparse.cc.

◆ YY_BREAK

#define YY_BREAK   break;

Definition at line 1402 of file libparse.cc.

◆ YY_BUF_SIZE

#define YY_BUF_SIZE   16384

Definition at line 117 of file libparse.cc.

◆ YY_BUFFER_EOF_PENDING

#define YY_BUFFER_EOF_PENDING   2

Definition at line 218 of file libparse.cc.

◆ YY_BUFFER_NEW

#define YY_BUFFER_NEW   0

Definition at line 206 of file libparse.cc.

◆ YY_BUFFER_NORMAL

#define YY_BUFFER_NORMAL   1

Definition at line 207 of file libparse.cc.

◆ yy_create_buffer

#define yy_create_buffer   yylp_create_buffer

Definition at line 1 of file libparse.cc.

◆ YY_CURRENT_BUFFER

#define YY_CURRENT_BUFFER   yy_current_buffer

Definition at line 227 of file libparse.cc.

◆ YY_DECL

#define YY_DECL
Value:
int yylex(const char *newlib, const char *libfile, \
lib_style_types *lib_style, \
idhdl pl, BOOLEAN autoexport, lp_modes mode)
lp_modes
Definition: libparse.h:10
Definition: idrec.h:34
lib_style_types
Definition: libparse.h:9
int BOOLEAN
Definition: auxiliary.h:87
#define yylex
Definition: libparse.cc:13

Definition at line 1201 of file libparse.cc.

◆ yy_delete_buffer

#define yy_delete_buffer   yylp_delete_buffer

Definition at line 2 of file libparse.cc.

◆ YY_DO_BEFORE_ACTION

#define YY_DO_BEFORE_ACTION
Value:
yytext_ptr -= yy_more_len; \
yyleng = (int) (yy_cp - yytext_ptr); \
yy_hold_char = *yy_cp; \
*yy_cp = '\0'; \
yy_c_buf_p = yy_cp;
#define yytext_ptr
Definition: libparse.cc:288
register char * yy_cp
Definition: libparse.cc:1414
STATIC_VAR int yy_more_len
Definition: libparse.cc:1045
register char * yy_bp
Definition: libparse.cc:1414

Definition at line 298 of file libparse.cc.

◆ YY_END_OF_BUFFER

#define YY_END_OF_BUFFER   97

Definition at line 307 of file libparse.cc.

◆ YY_END_OF_BUFFER_CHAR

#define YY_END_OF_BUFFER_CHAR   0

Definition at line 114 of file libparse.cc.

◆ YY_EXIT_FAILURE

#define YY_EXIT_FAILURE   2

Definition at line 3231 of file libparse.cc.

◆ YY_FATAL_ERROR

#define YY_FATAL_ERROR (   msg)    yy_fatal_error( msg )

Definition at line 1383 of file libparse.cc.

◆ yy_flex_debug

#define yy_flex_debug   yylp_flex_debug

Definition at line 6 of file libparse.cc.

◆ YY_FLEX_MAJOR_VERSION

#define YY_FLEX_MAJOR_VERSION   2

Definition at line 26 of file libparse.cc.

◆ YY_FLEX_MINOR_VERSION

#define YY_FLEX_MINOR_VERSION   5

Definition at line 27 of file libparse.cc.

◆ yy_flush_buffer

#define yy_flush_buffer   yylp_flush_buffer

Definition at line 8 of file libparse.cc.

◆ YY_FLUSH_BUFFER

#define YY_FLUSH_BUFFER   yy_flush_buffer( yy_current_buffer )

Definition at line 256 of file libparse.cc.

◆ yy_init_buffer

#define yy_init_buffer   yylp_init_buffer

Definition at line 7 of file libparse.cc.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ( ((result = libread( (yyin), (char *) buf, max_size )) < 0 ) \
&& ferror( yyin ) ) \
YY_FATAL_ERROR( "read in flex scanner failed" );
int libread(FILE *f, char *buf, int max_size)
Definition: libparse.cc:3351
int status int void * buf
Definition: si_signals.h:59
#define yyin
Definition: libparse.cc:11
return result
Definition: facAbsBiFact.cc:76

Definition at line 1205 of file libparse.cc.

◆ yy_load_buffer_state

#define yy_load_buffer_state   yylp_load_buffer_state

Definition at line 9 of file libparse.cc.

◆ YY_MORE_ADJ

#define YY_MORE_ADJ   yy_more_len

Definition at line 1047 of file libparse.cc.

◆ yy_new_buffer

#define yy_new_buffer   yy_create_buffer

Definition at line 266 of file libparse.cc.

◆ YY_NEW_FILE

#define YY_NEW_FILE   yyrestart( yyin )

Definition at line 112 of file libparse.cc.

◆ YY_NO_POP_STATE

#define YY_NO_POP_STATE   1

Definition at line 1313 of file libparse.cc.

◆ YY_NO_PUSH_STATE

#define YY_NO_PUSH_STATE   1

Definition at line 1312 of file libparse.cc.

◆ YY_NO_TOP_STATE

#define YY_NO_TOP_STATE   1

Definition at line 1314 of file libparse.cc.

◆ YY_NULL

#define YY_NULL   0

Definition at line 86 of file libparse.cc.

◆ YY_NUM_RULES

#define YY_NUM_RULES   96

Definition at line 306 of file libparse.cc.

◆ YY_PROTO

#define YY_PROTO (   proto)    proto

Definition at line 80 of file libparse.cc.

◆ YY_READ_BUF_SIZE

#define YY_READ_BUF_SIZE   8192

Definition at line 1334 of file libparse.cc.

◆ YY_RESTORE_YY_MORE_OFFSET

#define YY_RESTORE_YY_MORE_OFFSET

Definition at line 1048 of file libparse.cc.

◆ YY_RULE_SETUP

#define YY_RULE_SETUP
Value:
if ( yyleng > 0 ) \
yy_current_buffer->yy_at_bol = \
(yytext[yyleng - 1] == '\n'); \
YY_USER_ACTION
#define yytext
Definition: libparse.cc:16
#define yyleng
Definition: libparse.cc:12

Definition at line 1405 of file libparse.cc.

◆ YY_SC_TO_UI

#define YY_SC_TO_UI (   c)    ((unsigned int) (unsigned char) c)

Definition at line 93 of file libparse.cc.

◆ yy_scan_buffer

#define yy_scan_buffer   yylp_scan_buffer

Definition at line 3 of file libparse.cc.

◆ yy_scan_bytes

#define yy_scan_bytes   yylp_scan_bytes

Definition at line 5 of file libparse.cc.

◆ yy_scan_string

#define yy_scan_string   yylp_scan_string

Definition at line 4 of file libparse.cc.

◆ yy_set_bol

#define yy_set_bol (   at_bol)
Value:
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_at_bol = at_bol; \
}
#define yy_create_buffer
Definition: libparse.cc:1
#define yyin
Definition: libparse.cc:11
#define YY_BUF_SIZE
Definition: libparse.cc:117
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

Definition at line 275 of file libparse.cc.

◆ yy_set_interactive

#define yy_set_interactive (   is_interactive)
Value:
{ \
if ( ! yy_current_buffer ) \
yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \
yy_current_buffer->yy_is_interactive = is_interactive; \
}
#define yy_create_buffer
Definition: libparse.cc:1
#define yyin
Definition: libparse.cc:11
#define YY_BUF_SIZE
Definition: libparse.cc:117
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

Definition at line 268 of file libparse.cc.

◆ YY_SKIP_YYWRAP

#define YY_SKIP_YYWRAP

Definition at line 1079 of file libparse.cc.

◆ YY_START

#define YY_START   ((yy_start - 1) / 2)

Definition at line 105 of file libparse.cc.

◆ YY_START_STACK_INCR

#define YY_START_STACK_INCR   25

Definition at line 1378 of file libparse.cc.

◆ YY_STATE_EOF

#define YY_STATE_EOF (   state)    (YY_END_OF_BUFFER + state + 1)

Definition at line 109 of file libparse.cc.

◆ yy_switch_to_buffer

#define yy_switch_to_buffer   yylp_switch_to_buffer

Definition at line 10 of file libparse.cc.

◆ YY_USE_CONST

#define YY_USE_CONST

Definition at line 51 of file libparse.cc.

◆ YY_USE_PROTOS

#define YY_USE_PROTOS

Definition at line 48 of file libparse.cc.

◆ YY_USER_ACTION

#define YY_USER_ACTION

Definition at line 1397 of file libparse.cc.

◆ YY_USER_INIT

#define YY_USER_INIT
Value:
{ \
BEGIN(header); \
yylplineno = 1; \
yylp_errno = 0; \
*lib_style = OLD_LIBSTYLE; \
strcpy(libnamebuf,"(**unknown version**)"); \
}
VAR char libnamebuf[1024]
Definition: libparse.cc:1098
#define header
Definition: libparse.cc:1228

Definition at line 1210 of file libparse.cc.

◆ yyconst

#define yyconst   const

Definition at line 73 of file libparse.cc.

◆ yyin

VAR FILE * yyin   yylpin

Definition at line 11 of file libparse.cc.

◆ yyleng

EXTERN_VAR int yyleng   yylpleng

Definition at line 12 of file libparse.cc.

◆ yyless [1/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
YY_RESTORE_YY_MORE_OFFSET \
yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \
YY_DO_BEFORE_ACTION; /* set up yytext again */ \
} \
while ( 0 )
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
register char * yy_cp
Definition: libparse.cc:1414
register char * yy_bp
Definition: libparse.cc:1414
#define YY_MORE_ADJ
Definition: libparse.cc:1047

Definition at line 3250 of file libparse.cc.

◆ yyless [2/2]

#define yyless (   n)
Value:
do \
{ \
/* Undo effects of setting up yytext. */ \
yytext[yyleng] = yy_hold_char; \
yy_c_buf_p = yytext + n; \
yy_hold_char = *yy_c_buf_p; \
*yy_c_buf_p = '\0'; \
yyleng = n; \
} \
while ( 0 )
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
#define yytext
Definition: libparse.cc:16
#define yyleng
Definition: libparse.cc:12
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239

Definition at line 3250 of file libparse.cc.

◆ yylex

#define yylex   yylplex

Definition at line 13 of file libparse.cc.

◆ yymore

#define yymore ( )    (yy_more_flag = 1)

Definition at line 1046 of file libparse.cc.

◆ yyout

VAR FILE * yyout   yylpout

Definition at line 14 of file libparse.cc.

◆ yyrestart

#define yyrestart   yylprestart

Definition at line 15 of file libparse.cc.

◆ YYSTATE

#define YYSTATE   YY_START

Definition at line 106 of file libparse.cc.

◆ yyterminate

#define yyterminate ( )    return YY_NULL

Definition at line 1373 of file libparse.cc.

◆ yytext

EXTERN_VAR char * yytext   yylptext

Definition at line 16 of file libparse.cc.

◆ yytext_ptr

#define yytext_ptr   yytext

Definition at line 288 of file libparse.cc.

◆ yywrap

#define yywrap   yylpwrap

Definition at line 17 of file libparse.cc.

Typedef Documentation

◆ YY_CHAR

typedef unsigned char YY_CHAR

Definition at line 284 of file libparse.cc.

◆ yy_size_t

typedef unsigned int yy_size_t

Definition at line 161 of file libparse.cc.

◆ yy_state_type

typedef int yy_state_type

Definition at line 286 of file libparse.cc.

Enumeration Type Documentation

◆ lib_cmds

enum lib_cmds
Enumerator
LP_NONE 
LP_INFO 
LP_CATEGORY 
LP_URL 
LP_VERSION 

Definition at line 1081 of file libparse.cc.

Function Documentation

◆ copy_string()

void copy_string ( lp_modes  mode)

Definition at line 3406 of file libparse.cc.

3407 {
3408 #ifdef STANDALONE_PARSER
3409  if ((texinfo_out
3410  && (last_cmd == LP_INFO || last_cmd == LP_CATEGORY || last_cmd == LP_URL))
3411  || (category_out && last_cmd == LP_CATEGORY)
3412 )
3413  {
3414  long current_location = ftell(yylpin), i = string_start, quote = 0;
3415  char c;
3416  if (texinfo_out)
3417  {
3418  if (last_cmd == LP_INFO)
3419  {
3420  printf("$info = <<EOT;\n");
3421  }
3422  else if (last_cmd == LP_URL)
3423  {
3424  printf("$url = <<EOT;\n");
3425  }
3426  else
3427  {
3428  printf("$category = <<EOT;\n");
3429  }
3430  }
3431  fseek (yylpin, i, SEEK_SET);
3432  while (i< current_location)
3433  {
3434  c = fgetc(yylpin);
3435  if (c == '\\')
3436  {
3437  quote = (! quote);
3438  }
3439  else if (c == '"')
3440  {
3441  if (! quote) break;
3442  }
3443  else
3444  quote = 0;
3445  if (c == '@' || c == '$') putchar('\\');
3446  if (c != '\r') putchar(c);
3447  i++;
3448  }
3449  if (category_out) exit(0);
3450  fseek (yylpin, current_location, SEEK_SET);
3451  printf("\nEOT\n");
3452  }
3453 #else
3454  if((last_cmd == LP_INFO)&&(mode == GET_INFO))
3455  {
3456  int i, offset=0;
3457  long current_location = ftell(yylpin);
3458  int len = (int)(current_pos(0) - string_start);
3459  fseek(yylpin, string_start, SEEK_SET);
3461  text_buffer = (char *)omAlloc(len+2);
3463  myfread(text_buffer, len, 1, yylpin);
3464  fseek(yylpin, current_location, SEEK_SET);
3465  text_buffer[len]='\0';
3466  offset=0;
3467  for(i=0;i<=len; i++)
3468  {
3469  if(text_buffer[i]=='\\' &&
3470  (text_buffer[i+1]=='\"' || text_buffer[i+1]=='{' ||
3471  text_buffer[i+1]=='}' || text_buffer[i+1]=='\\'))
3472  {
3473  i++;
3474  offset++;
3475  }
3476  if(offset>0) text_buffer[i-offset] = text_buffer[i];
3477  }
3478  }
3479 #endif /* STANDALONE_PARSER */
3480 }
VAR int offset
Definition: libparse.cc:1093
void * ADDRESS
Definition: auxiliary.h:135
VAR int texinfo_out
Definition: libparse.cc:1107
#define omAlloc(size)
Definition: omAllocDecl.h:210
int current_pos(int i)
Definition: libparse.cc:3346
#define omFree(addr)
Definition: omAllocDecl.h:261
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
Definition: feFopen.cc:195
int i
Definition: cfEzgcd.cc:125
VAR lib_cmds last_cmd
Definition: libparse.cc:1096
VAR int quote
Definition: libparse.cc:1092
VAR long string_start
Definition: libparse.cc:1100
#define NULL
Definition: omList.c:12
void omMarkAsStaticAddr(void *addr)
#define SEEK_SET
Definition: mod2.h:116
VAR char * text_buffer
Definition: libparse.cc:1099

◆ current_pos()

int current_pos ( int  i)

Definition at line 3346 of file libparse.cc.

3347 {
3348  return(i+offset+(int)(yytext-yylp_buffer_start));
3349 }
#define yytext
Definition: libparse.cc:16
VAR int offset
Definition: libparse.cc:1093
int i
Definition: cfEzgcd.cc:125
VAR char * yylp_buffer_start
Definition: libparse.cc:1102

◆ if()

if ( yy_init  )

Definition at line 1420 of file libparse.cc.

1421  {
1422  yy_init = 0;
1423 
1424 #ifdef YY_USER_INIT
1425  YY_USER_INIT;
1426 #endif
1427 
1428  if ( ! yy_start )
1429  yy_start = 1; /* first start state */
1430 
1431  if ( ! yyin )
1432  yyin = stdin;
1433 
1434  if ( ! yyout )
1435  yyout = stdout;
1436 
1437  if ( ! yy_current_buffer )
1440 
1442  }
#define yy_load_buffer_state
Definition: libparse.cc:9
STATIC_VAR int yy_init
Definition: libparse.cc:240
#define yy_create_buffer
Definition: libparse.cc:1
#define yyin
Definition: libparse.cc:11
#define yyout
Definition: libparse.cc:14
#define YY_BUF_SIZE
Definition: libparse.cc:117
#define YY_USER_INIT
Definition: libparse.cc:1210
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221
STATIC_VAR int yy_start
Definition: libparse.cc:241

◆ libread()

int libread ( FILE *  f,
char *  buf,
int  max_size 
)

Definition at line 3351 of file libparse.cc.

3352 { int rc;
3353 
3354  offset = ftell(f);
3355  rc = myfread( buf, 1, max_size, f );
3356  #if YYLPDEBUG >2
3357  printf("fread: %d of %d\n", rc, max_size);
3358  #endif
3360  return rc;
3361 }
VAR int offset
Definition: libparse.cc:1093
size_t myfread(void *ptr, size_t size, size_t nmemb, FILE *stream)
Definition: feFopen.cc:195
int status int void * buf
Definition: si_signals.h:59
FILE * f
Definition: checklibs.c:9
VAR char * yylp_buffer_start
Definition: libparse.cc:1102

◆ make_version()

void make_version ( char *  p,
int  what 
)

Definition at line 3386 of file libparse.cc.

3387 {
3388  char ver[11];
3389  char date[17];
3390  ver[0]='?'; ver[1]='.'; ver[2]='?'; ver[3]='\0';
3391  date[0]='?'; date[1]='\0';
3392  if(what) sscanf(p,"%*[^=]= %*s %*s %10s %16s",ver,date);
3393  else sscanf(p,"// %*s %*s %10s %16s",ver,date);
3394  strcpy(libnamebuf,"(");
3395  strcat(libnamebuf,ver);
3396  strcat(libnamebuf,",");
3397  strcat(libnamebuf,date);
3398  strcat(libnamebuf,")");
3399  if(what && strcmp(libnamebuf, "(?.?,?)")==0)
3400  {
3401  sscanf(p,"%*[^\"]\"%[^\"]\"",libnamebuf);
3402  }
3403  //printf("ID=(%d)%s; \n", what, p);
3404 }
VAR char libnamebuf[1024]
Definition: libparse.cc:1098
int p
Definition: cfModGcd.cc:4019

◆ print_init()

void print_init ( )

Definition at line 3482 of file libparse.cc.

3483 {
3484  printf("Init=%d\n", yy_init);
3485 }
STATIC_VAR int yy_init
Definition: libparse.cc:240

◆ print_version()

void print_version ( lp_modes  mode,
char *  p 
)

Definition at line 3487 of file libparse.cc.

3488 {
3489 #ifdef STANDALONE_PARSER
3490  //printf("loading %s%s", p, libnamebuf);
3491 #else
3492  if ( mode == LOAD_LIB )
3493  {
3494  if (BVERBOSE(V_LOAD_LIB) && p!=NULL ) Print(" %s...", p);
3495  //Warn( "loading %s%s", p, libnamebuf);
3496  }
3497 #endif
3498 }
#define Print
Definition: emacs.cc:80
#define V_LOAD_LIB
Definition: options.h:46
#define BVERBOSE(a)
Definition: options.h:34
#define NULL
Definition: omList.c:12
int p
Definition: cfModGcd.cc:4019

◆ reinit_yylp()

void reinit_yylp ( )

Definition at line 3376 of file libparse.cc.

3377 {
3378  brace1 = 0;
3379  brace2 = 0;
3380  brace3 = 0;
3381  quote = 0;
3382  yy_init=1;
3384 }
#define YY_CURRENT_BUFFER
Definition: libparse.cc:227
STATIC_VAR int yy_init
Definition: libparse.cc:240
VAR int brace3
Definition: libparse.cc:1091
VAR int brace2
Definition: libparse.cc:1090
VAR int brace1
Definition: libparse.cc:1089
VAR int quote
Definition: libparse.cc:1092
#define yy_delete_buffer
Definition: libparse.cc:2

◆ while()

while ( )

Definition at line 1444 of file libparse.cc.

1445  {
1446  yy_more_len = 0;
1447  if ( yy_more_flag )
1448  {
1450  yy_more_flag = 0;
1451  }
1452  yy_cp = yy_c_buf_p;
1453 
1454  /* Support of yytext. */
1455  *yy_cp = yy_hold_char;
1456 
1457  /* yy_bp points to the position in yy_ch_buf of the start of
1458  * the current run.
1459  */
1460  yy_bp = yy_cp;
1461 
1462  yy_current_state = yy_start;
1463  yy_current_state += YY_AT_BOL();
1464 yy_match:
1465  do
1466  {
1467  register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
1468  if ( yy_accept[yy_current_state] )
1469  {
1470  yy_last_accepting_state = yy_current_state;
1472  }
1473  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
1474  {
1475  yy_current_state = (int) yy_def[yy_current_state];
1476  if ( yy_current_state >= 485 )
1477  yy_c = yy_meta[(unsigned int) yy_c];
1478  }
1479  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
1480  ++yy_cp;
1481  }
1482  while ( yy_current_state != 484 );
1484  yy_current_state = yy_last_accepting_state;
1485 
1486 yy_find_action:
1487  yy_act = yy_accept[yy_current_state];
1488 
1490 
1491 
1492 do_action: /* This label is used only to access EOF actions. */
1493 
1494 
1495  switch ( yy_act )
1496  { /* beginning of action switch */
1497  case 0: /* must back up */
1498  /* undo the effects of YY_DO_BEFORE_ACTION */
1499  *yy_cp = yy_hold_char;
1501  yy_current_state = yy_last_accepting_state;
1502  goto yy_find_action;
1503 
1504 case 1:
1506 #line 230 "libparse.l"
1507 { }
1508  YY_BREAK
1509 case 2:
1511 #line 231 "libparse.l"
1512 { old_state = YYSTATE; BEGIN(comment); }
1513  YY_BREAK
1514 case 3:
1516 #line 233 "libparse.l"
1517 {
1518  yyless(4); old_state = YYSTATE; BEGIN(info);
1519  }
1520  YY_BREAK
1521 case 4:
1523 #line 236 "libparse.l"
1524 {
1526  }
1527  YY_BREAK
1528 case 5:
1530 #line 239 "libparse.l"
1531 {
1532  if ( mode != GET_INFO )
1533  {
1534  #ifdef STANDALONE_PARSER
1535  if (texinfo_out)
1536  {
1537  char *c = yytext;
1538  printf("$url = \"");
1539  while ((*c != '\0') && (*c != '"')) c++;
1540  c++;
1541  while ((*c != '\0') && (*c != '"'))
1542  {
1543  if (*c != '\r') putchar(*c);
1544  c++;
1545  }
1546  printf("\";\n");
1547  }
1548  #endif
1549  }
1550  }
1551  YY_BREAK
1552 case 6:
1554 #line 260 "libparse.l"
1555 {
1556  found_version++;
1557  if ( mode != GET_INFO )
1558  {
1559  make_version(yytext,1);
1560  #ifdef STANDALONE_PARSER
1561  if (texinfo_out)
1562  {
1563  char *c = libnamebuf;
1564  printf("$version = \"");
1565  while (*c != '\0')
1566  {
1567  if (*c == '$' || *c == '@') putchar('\\');
1568  if (*c != '\r') putchar(*c);
1569  if (*c == '\\')
1570  {
1571  c++;
1572  if (*c != '"') putchar('\\');
1573  }
1574  else
1575  c++;
1576  }
1577  printf("\";\n");
1578  }
1579  else if (!category_out)
1580  printf("Version:%s;\n", libnamebuf);
1581  #else
1585  #endif
1586  }
1587  }
1588  YY_BREAK
1589 case 7:
1591 #line 294 "libparse.l"
1592 { p_static=TRUE; }
1593  YY_BREAK
1594 case 8:
1596 #line 296 "libparse.l"
1597 {
1598  char proc[256];
1599  BEGIN(pdef);
1600  found_proc_in_proc = 0;
1601  proc[0]='\0';
1602  sscanf( yytext, "%*[^p]proc %s", proc);
1603  if(strlen(proc)<1) sscanf( yytext, "proc %s", proc);
1604  #if YYLPDEBUG > 1
1605  printf("Newlib:%s\n", newlib);
1606  #endif
1607  #ifdef STANDALONE_PARSER
1608  if ( pi != NULL )
1609  {
1610  printpi(pi);
1611  pi_clear(pi);
1612  }
1613  pi = (procinfo *)malloc(sizeof(procinfo));
1614  iiInitSingularProcinfo(pi, newlib, proc, yylplineno,
1615  current_pos(0), p_static);
1616  #else /*STANDALONE_PARSER*/
1617  if( mode == LOAD_LIB)
1618  {
1619  h0 = enterid( proc, 0 /*myynest*/, PROC_CMD,
1620  &(IDPACKAGE(pl)->idroot), TRUE, !p_static);
1621  if (h0==NULL) return(1);
1622  if((!p_static) && autoexport)
1623  {
1624  package save=currPack;
1626  h_top = enterid( proc, 0 /*myynest*/, PROC_CMD,
1627  &(basePack->idroot), FALSE );
1628  currPack=save;
1629  if (h_top==NULL) return(1);
1630  }
1631  /* omCheckAddr(IDID(h0)); */
1632  if (h0!=NULL)
1633  {
1634  iiInitSingularProcinfo(IDPROC(h0), newlib, proc,
1636  if ((!p_static) && (h_top != NULL) && autoexport)
1637  {
1639  IDPROC(h_top)=IDPROC(h0);
1640  IDPROC(h_top)->ref++;
1641  }
1642  IDPROC(h0)->pack=IDPACKAGE(pl);
1643  if (BVERBOSE(V_LOAD_PROC))
1644  Warn( " proc '%s' registered", proc );
1645  }
1646  #endif /*STANDALONE_PARSER*/
1647  SET_DEF_END(mode, pi, current_pos(yyleng+1));
1648  #if YYLPDEBUG
1649  if(lpverbose)
1650  {
1651  printf("// PROCEDURE '%s' status: %s, ", proc,
1652  p_static ? "local" : "global");
1653  printf("starting at line %d,%d: definition end: %d (%d).\n",
1654  yylplineno, current_pos(0), (int)pi->data.s.def_end, brace1);
1655  }
1656  #endif
1657  p_static=FALSE;
1658  #ifndef STANDALONE_PARSER
1659  }
1660  #endif /*STANDALONE_PARSER*/
1661  }
1662  YY_BREAK
1663 case 9:
1665 #line 361 "libparse.l"
1666 {
1667  BEGIN(pexample);
1669  #if YYLPDEBUG
1670  if(lpverbose)
1671  {
1672  printf("// EXAMPLE at line %d,%d (%d)\n", yylplineno,
1673  current_pos(0), brace1);
1674  }
1675  #endif
1676  }
1677  YY_BREAK
1678 case 10:
1680 #line 373 "libparse.l"
1681 { quote++;
1682  BEGIN(libcmd);
1683  }
1684  YY_BREAK
1685 case 11:
1687 #line 377 "libparse.l"
1688 { quote++; brace2++;
1689  BEGIN(libcmd2);
1690  }
1691  YY_BREAK
1692 case 12:
1694 #line 381 "libparse.l"
1695 {
1696  make_version(yytext, 0);
1697  #if YYLPDEBUG > 1
1698  printf("+(id)HEAD:%s\n", yytext);
1699  #endif
1700  }
1701  YY_BREAK
1702 case 13:
1704 #line 387 "libparse.l"
1705 {
1706  #if YYLPDEBUG
1707  printf("+(cmt)HEAD:%s\n", yytext);
1708  #endif
1709  }
1710  YY_BREAK
1711 case 14:
1713 #line 392 "libparse.l"
1714 {
1715  #if YYLPDEBUG > 1
1716  printf("-HEAD:%s\n", yytext);
1717  #endif
1718  }
1719  YY_BREAK
1720 case 15:
1722 #line 397 "libparse.l"
1723 { yyless(0);
1724  BEGIN(INITIAL);
1725  yymore();
1726  }
1727  YY_BREAK
1728 case 16:
1730 #line 401 "libparse.l"
1731 {
1732  yyless(0);
1733  *lib_style = NEW_LIBSTYLE;
1734  BEGIN(INITIAL);
1735  yymore();
1736  }
1737  YY_BREAK
1738 case 17:
1740 #line 408 "libparse.l"
1741 { quote++;
1742  BEGIN(libcmd);
1743  }
1744  YY_BREAK
1745 case 18:
1747 #line 411 "libparse.l"
1748 { quote++; brace2++;
1749  BEGIN(libcmd2);
1750  }
1751  YY_BREAK
1752 case 19:
1754 #line 414 "libparse.l"
1755 { yylplineno++; }
1756  YY_BREAK
1757 case 20:
1759 #line 415 "libparse.l"
1760 {
1761  #if YYLPDEBUG > 1
1762  printf(" HEAD:%s\n", yytext);
1763  #endif
1764  yyless(0);
1765  BEGIN(help);
1766  }
1767  YY_BREAK
1768 case 21:
1770 #line 422 "libparse.l"
1771 {
1772  #if YYLPDEBUG > 1
1773  printf(" HELP:%s\n", yytext);
1774  #endif
1775  BEGIN(INITIAL); }
1776  YY_BREAK
1777 case 22:
1779 #line 427 "libparse.l"
1780 {
1781  #if YYLPDEBUG > 1
1782  printf(" HELP:%s\n", yytext);
1783  #endif
1784  BEGIN(INITIAL);
1785  }
1786  YY_BREAK
1787 case 23:
1789 #line 433 "libparse.l"
1790 {
1791  yyless(0);
1792  *lib_style = NEW_LIBSTYLE;
1793  BEGIN(INITIAL);
1794  yymore();
1795  }
1796  YY_BREAK
1797 case 24:
1799 #line 439 "libparse.l"
1800 {
1801  yyless(0);
1802  //printf("2) proc found.\n");
1803  BEGIN(INITIAL);
1804  yymore();
1805  }
1806  YY_BREAK
1807 case 25:
1809 #line 445 "libparse.l"
1810 { quote++;
1811  BEGIN(libcmd);
1812  }
1813  YY_BREAK
1814 case 26:
1816 #line 448 "libparse.l"
1817 { quote++; brace2++;
1818  BEGIN(libcmd2);
1819  }
1820  YY_BREAK
1821 case 27:
1823 #line 452 "libparse.l"
1824 { yylplineno++; }
1825  YY_BREAK
1826 case 28:
1828 #line 453 "libparse.l"
1829 {
1830  #if YYLPDEBUG
1831  if(lpverbose>2) printf("--->%s<---\n", yytext);
1832  #endif
1833  }
1834  YY_BREAK
1835 case 29:
1837 #line 458 "libparse.l"
1838 {
1839  found_oldhelp=1;
1840  #if YYLPDEBUG > 1
1841  printf("-HELP:%s\n", yytext);
1842  #endif
1843  }
1844  YY_BREAK
1845 case 30:
1847 #line 466 "libparse.l"
1848 { quote--;
1849  yytext[yyleng-1] = '\0';
1850  #ifndef STANDALONE_PARSER
1851  if ( mode == LOAD_LIB )
1852  {
1853  library_stack->push(newlib, yytext);
1854  }
1855  #endif /* STANDALONE_PARSER */
1856  #if YYLPDEBUG
1857  if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1858  #endif
1859  BEGIN(INITIAL);
1860  }
1861  YY_BREAK
1862 case 31:
1864 #line 479 "libparse.l"
1865 { quote--; brace2--;
1866  yytext[yyleng-1] = '\0';
1867  #ifndef STANDALONE_PARSER
1868  if ( mode == LOAD_LIB )
1869  {
1870  library_stack->push(newlib, yytext);
1871  }
1872  #endif /* STANDALONE_PARSER */
1873  #if YYLPDEBUG
1874  if(lpverbose>1) printf("LIB:'%s'\n", yytext);
1875  #endif
1876  BEGIN(INITIAL);
1877  }
1878  YY_BREAK
1879 case 32:
1881 #line 493 "libparse.l"
1882 { }
1883  YY_BREAK
1884 case 33:
1886 #line 494 "libparse.l"
1887 {
1888  brace2++;
1889  #if YYLPDEBUG > 1
1890  printf("%s", yytext);
1891  #endif
1892  }
1893  YY_BREAK
1894 case 34:
1896 #line 500 "libparse.l"
1897 {
1898  brace2--;
1899  #if YYLPDEBUG > 1
1900  printf(">%s<\n", yytext);
1901  printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1902  #endif
1903  if(brace2<=0)
1904  {
1905  #if YYLPDEBUG > 1
1906  printf("BEGIN(phead){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1907  #endif
1908  SET_DEF_END(mode, pi, current_pos(yyleng));
1909  BEGIN(phead);
1910  }
1911  }
1912  YY_BREAK
1913 case 35:
1915 #line 515 "libparse.l"
1916 {
1917  if(brace2>0)
1918  {
1919  #if YYLPDEBUG > 1
1920  printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1921  #endif
1923  return(1);
1924  }
1925  else
1926  {
1927  brace1++; BEGIN(pbody);
1928  if(lpverbose)
1929  printf("// BODY at line %d,%d (%d)\n", yylplineno,
1930  current_pos(0), brace1);
1932  }
1933  }
1934  YY_BREAK
1935 case 36:
1937 #line 533 "libparse.l"
1938 { yylplineno++;
1939  if(brace2<=0)
1940  {
1941 #if YYLPDEBUG > 1
1942  printf("BEGIN(phead-2){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
1943 #endif
1944  BEGIN(phead);
1945  }
1946  }
1947  YY_BREAK
1948 case 37:
1950 #line 542 "libparse.l"
1951 { }
1952  YY_BREAK
1953 case 38:
1955 #line 543 "libparse.l"
1956 { old_state = YYSTATE; BEGIN(comment); }
1957  YY_BREAK
1958 case 39:
1960 #line 544 "libparse.l"
1961 {
1962  if(brace2<=0)
1963  {
1964  BEGIN(phead);
1965  yyless(0);
1966  }
1967  }
1968  YY_BREAK
1969 case 40:
1971 #line 552 "libparse.l"
1972 {
1973  #if YYLPDEBUG
1974  if(lpverbose>2)printf("0-Len=%d;\n", yyleng);
1975  #endif
1976  if(check)
1977  {
1978  printf("Procedure %s has OLD-STYLE-HELP!\n",
1979  pi->procname);
1980  }
1981  SET_HELP_START(mode, pi, current_pos(0));
1982  BEGIN(poldhelp);
1983  yyless(0);
1984  }
1985  YY_BREAK
1986 case 41:
1988 #line 565 "libparse.l"
1989 {
1990  #if YYLPDEBUG
1991  if(lpverbose>2)printf("1-Len=%d;\n", yyleng);
1992  #endif
1993  BEGIN(phelp);
1994  yyless(0);
1995  }
1996  YY_BREAK
1997 case 42:
1999 #line 572 "libparse.l"
2000 {
2001  if(check && yyleng>2)
2002  {
2003  printf("Procedure %s has OLD-STYLE-HELP!\n",
2004  pi->procname);
2005  }
2006  #if YYLPDEBUG
2007  if(lpverbose>2 && yyleng>2)
2008  printf("2-Len=%d, %s;\n", yyleng, pi->procname);
2009  #endif
2010  SET_HELP_START(mode, pi, current_pos(0));
2011  BEGIN(poldhelp);
2012  yyless(0);
2013  }
2014  YY_BREAK
2015 case 43:
2017 #line 586 "libparse.l"
2018 { printf("[%s]", yytext); }
2019  YY_BREAK
2020 case 44:
2022 #line 588 "libparse.l"
2023 { }
2024  YY_BREAK
2025 case 45:
2027 #line 589 "libparse.l"
2028 {
2029  SET_HELP_END(mode, pi, current_pos(0));
2030  brace1++; BEGIN(pbody);
2031  if(lpverbose)
2032  {
2033  printf("// HELP from %d to %d\n",
2034  (int)pi->data.s.help_start, (int)pi->data.s.help_end);
2035  printf("// BODY at line %d,%d (%d)\n", yylplineno,
2036  current_pos(0), brace1);
2037  }
2038 #if YYLPDEBUG > 1
2039  printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2040 #endif
2042 #if YYLPDEBUG > 1
2043  printf("BODY at %d/%d", yylplineno, current_pos(0));
2044 #endif
2045  }
2046  YY_BREAK
2047 case 46:
2049 #line 607 "libparse.l"
2050 { yylplineno++; }
2051  YY_BREAK
2052 case 47:
2054 #line 608 "libparse.l"
2055 { }
2056  YY_BREAK
2057 case 48:
2059 #line 610 "libparse.l"
2060 {
2061  old_state = YYSTATE;
2062  BEGIN(string);
2063  SET_HELP_START(mode, pi, current_pos(1));
2064  }
2065  YY_BREAK
2066 case 49:
2068 #line 615 "libparse.l"
2069 {}
2070  YY_BREAK
2071 case 50:
2073 #line 616 "libparse.l"
2074 {
2075  brace1++; BEGIN(pbody);
2076  if(lpverbose)
2077  {
2078  printf("// HELP from %d to %d\n",
2079  (int)pi->data.s.help_start, (int)pi->data.s.help_end);
2080  printf("// BODY at line %d,%d (%d)\n", yylplineno,
2081  current_pos(0), brace1);
2082  }
2083  #if YYLPDEBUG > 1
2084  printf("BEGIN(pbody){=%d, (=%d, [=%d\n", brace1, brace2, brace3);
2085  #endif
2087  #if YYLPDEBUG > 1
2088  printf("BODY at %d/%d", yylplineno, current_pos(0));
2089  #endif
2090  }
2091  YY_BREAK
2092 case 51:
2094 #line 633 "libparse.l"
2095 { yylplineno++;}
2096  YY_BREAK
2097 case 52:
2099 #line 635 "libparse.l"
2100 { }
2101  YY_BREAK
2102 case 53:
2104 #line 636 "libparse.l"
2105 { quote++; old_state = YYSTATE;
2106  BEGIN(string); /* printf("%s", yytext); */
2107  }
2108  YY_BREAK
2109 case 54:
2111 #line 640 "libparse.l"
2112 {
2113  if(check) printf("*** found 2 proc whithin procedure '%s'.\n",
2114  pi->procname);
2115  yyless(yyleng-1);
2116  }
2117  YY_BREAK
2118 case 55:
2120 #line 645 "libparse.l"
2121 {
2122  if(check) printf("*** found 1 proc whithin procedure '%s'.\n",
2123  pi->procname);
2124  yyless(yyleng-1);
2125  }
2126  YY_BREAK
2127 case 56:
2129 #line 650 "libparse.l"
2130 {
2131  brace1++;
2132  #if YYLPDEBUG > 1
2133  printf("line: %d, (%d)%s\n", yylplineno, brace1, yytext);
2134  #endif
2135  }
2136  YY_BREAK
2137 case 57:
2139 #line 656 "libparse.l"
2140 {
2141  #if YYLPDEBUG > 1
2142  printf("line: %d, (%d)%s\n",
2144  #endif
2145  brace1--;
2146  if(brace2>0)
2147  {
2149  return(1);
2150  }
2151  if(brace3>0)
2152  {
2154  return(1);
2155  }
2156  if(brace1<=0)
2157  {
2158  SET_BODY_END(mode, pi, current_pos(yyleng));
2159  SET_PROC_END(mode, pi, current_pos(yyleng));
2160  #if YYLPDEBUG > 1
2161  printf("-%d\n", current_pos(0));
2162  #endif
2163  BEGIN(INITIAL);
2164  }
2165  }
2166  YY_BREAK
2167 case 58:
2169 #line 682 "libparse.l"
2170 {
2171  brace2++; /* printf("%s", yytext); */
2172  }
2173  YY_BREAK
2174 case 59:
2176 #line 685 "libparse.l"
2177 {
2178  brace2--; /* printf("%s", yytext); */
2179  if(brace2<0) {
2181  return(1);
2182  }
2183  }
2184  YY_BREAK
2185 case 60:
2187 #line 692 "libparse.l"
2188 {
2189  brace3++; /* printf("%s", yytext); */
2190  }
2191  YY_BREAK
2192 case 61:
2194 #line 695 "libparse.l"
2195 {
2196  brace3--; /* printf("%s", yytext); */
2197  if(brace3<0) {
2199  return(1);
2200  }
2201  }
2202  YY_BREAK
2203 case 62:
2205 #line 702 "libparse.l"
2206 { yylplineno++; }
2207  YY_BREAK
2208 case 63:
2210 #line 703 "libparse.l"
2211 { }
2212  YY_BREAK
2213 case 64:
2215 #line 705 "libparse.l"
2216 {
2217  quote++; BEGIN(string);
2218  found_info++;
2220  *lib_style = NEW_LIBSTYLE;
2221  last_cmd = LP_INFO;
2222  }
2223  YY_BREAK
2224 case 65:
2226 #line 712 "libparse.l"
2227 { yylplineno++; }
2228  YY_BREAK
2229 case 66:
2231 #line 713 "libparse.l"
2232 { }
2233  YY_BREAK
2234 case 67:
2236 #line 715 "libparse.l"
2237 {
2238  quote++; BEGIN(string);
2239  found_cat++;
2241  *lib_style = NEW_LIBSTYLE;
2243  }
2244  YY_BREAK
2245 case 68:
2247 #line 722 "libparse.l"
2248 { yylplineno++; }
2249  YY_BREAK
2250 case 69:
2252 #line 723 "libparse.l"
2253 { }
2254  YY_BREAK
2255 case 70:
2257 #line 726 "libparse.l"
2258 { quote--;
2259  copy_string(mode);
2260  last_cmd = LP_NONE;
2261  if(old_state==phelp)
2262  {
2263  SET_HELP_END(mode, pi, current_pos(0));
2264  }
2265  BEGIN(old_state); /* printf("%s", yytext); */
2266  }
2267  YY_BREAK
2268 case 71:
2270 #line 735 "libparse.l"
2271 { if (old_state == phelp) IncrCheckSum(*yytext);}
2272  YY_BREAK
2273 case 72:
2275 #line 736 "libparse.l"
2276 { yylplineno++; if (old_state == phelp) IncrCheckSum('\n');}
2277  YY_BREAK
2278 case 73:
2280 #line 737 "libparse.l"
2281 { if (old_state == phelp) IncrCheckSum(*yytext);}
2282  YY_BREAK
2283 case 74:
2285 #line 739 "libparse.l"
2286 { }
2287  YY_BREAK
2288 case 75:
2290 #line 740 "libparse.l"
2291 { quote++; old_state = YYSTATE;
2292  BEGIN(string); /* printf("%s", yytext); */
2293  }
2294  YY_BREAK
2295 case 76:
2297 #line 743 "libparse.l"
2298 {
2299  brace1++; /* printf("(%d)%s", brace1, yytext); */
2300  }
2301  YY_BREAK
2302 case 77:
2304 #line 746 "libparse.l"
2305 {
2306  brace1--; /* printf("(%d)%s", brace1, yytext); */
2307  if(brace1<=0) {
2308  if(brace2>0) { yylp_errno=YYLP_EX_BR2; return(1); }
2309  if(brace3>0) { yylp_errno=YYLP_EX_BR3; return(1); }
2310  BEGIN(INITIAL);
2311  SET_PROC_END(mode, pi, current_pos(yyleng));
2312  }
2313  }
2314  YY_BREAK
2315 case 78:
2317 #line 755 "libparse.l"
2318 {
2319  brace2++; /* printf("%s", yytext); */
2320  }
2321  YY_BREAK
2322 case 79:
2324 #line 758 "libparse.l"
2325 {
2326  brace2--; /* printf("%s", yytext); */
2327  }
2328  YY_BREAK
2329 case 80:
2331 #line 761 "libparse.l"
2332 {
2333  brace3++; /* printf("%s", yytext); */
2334  }
2335  YY_BREAK
2336 case 81:
2338 #line 764 "libparse.l"
2339 {
2340  brace3--; /* printf("%s", yytext); */
2341  }
2342  YY_BREAK
2343 case 82:
2345 #line 767 "libparse.l"
2346 { yylplineno++; }
2347  YY_BREAK
2348 case 83:
2350 #line 768 "libparse.l"
2351 { }
2352  YY_BREAK
2353 case 84:
2355 #line 770 "libparse.l"
2356 { quote--;
2357  BEGIN(pexample); /* printf("%s", yytext); */
2358  }
2359  YY_BREAK
2360 case 85:
2362 #line 773 "libparse.l"
2363 { }
2364  YY_BREAK
2365 case 86:
2367 #line 774 "libparse.l"
2368 { }
2369  YY_BREAK
2370 case 87:
2372 #line 775 "libparse.l"
2373 { yylplineno++; }
2374  YY_BREAK
2375 case 88:
2377 #line 776 "libparse.l"
2378 { }
2379  YY_BREAK
2380 case 89:
2382 #line 778 "libparse.l"
2383 { BEGIN(old_state); }
2384  YY_BREAK
2385 case 90:
2387 #line 779 "libparse.l"
2388 { yylplineno++; }
2389  YY_BREAK
2390 case 91:
2392 #line 780 "libparse.l"
2393 { }
2394  YY_BREAK
2395 case 92:
2397 #line 782 "libparse.l"
2398 { yylplineno++; }
2399  YY_BREAK
2400 case 93:
2402 #line 783 "libparse.l"
2403 { }
2404  YY_BREAK
2405 case 94:
2407 #line 784 "libparse.l"
2408 { p_static = FALSE;
2409  #if YYLPDEBUG > 1
2410  printf("%s", yytext);
2411  #endif
2412  }
2413  YY_BREAK
2414 case 95:
2416 #line 789 "libparse.l"
2417 { p_static = FALSE;
2419  #ifdef STANDALONE_PARSER
2420  printf("[%d]", *yytext);
2421  #else
2425  #endif
2426  #if YYLPDEBUG > 1
2427  printf("[%s]", yytext);
2428  #endif
2429  return(1);
2430  }
2431  YY_BREAK
2432 case 96:
2434 #line 804 "libparse.l"
2435 ECHO;
2436  YY_BREAK
2437 case YY_STATE_EOF(INITIAL):
2438 case YY_STATE_EOF(header):
2439 case YY_STATE_EOF(help):
2440 case YY_STATE_EOF(libcmd):
2441 case YY_STATE_EOF(libcmd2):
2442 case YY_STATE_EOF(pdef):
2443 case YY_STATE_EOF(phead):
2444 case YY_STATE_EOF(poldhelp):
2445 case YY_STATE_EOF(phelp):
2446 case YY_STATE_EOF(pbody):
2447 case YY_STATE_EOF(pstr):
2448 case YY_STATE_EOF(pexample):
2449 case YY_STATE_EOF(pestr):
2450 case YY_STATE_EOF(string):
2451 case YY_STATE_EOF(comment):
2452 case YY_STATE_EOF(info):
2453 case YY_STATE_EOF(category):
2454 case YY_STATE_EOF(url):
2455 case YY_STATE_EOF(version):
2456  yyterminate();
2457 
2458  case YY_END_OF_BUFFER:
2459  {
2460  /* Amount of text matched not including the EOB char. */
2461  int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1;
2462 
2463  /* Undo the effects of YY_DO_BEFORE_ACTION. */
2464  *yy_cp = yy_hold_char;
2466 
2467  if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW )
2468  {
2469  /* We're scanning a new file or input source. It's
2470  * possible that this happened because the user
2471  * just pointed yyin at a new source and called
2472  * yylex(). If so, then we have to assure
2473  * consistency between yy_current_buffer and our
2474  * globals. Here is the right place to do so, because
2475  * this is the first action (other than possibly a
2476  * back-up) that will match for the new input source.
2477  */
2478  yy_n_chars = yy_current_buffer->yy_n_chars;
2479  yy_current_buffer->yy_input_file = yyin;
2480  yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL;
2481  }
2482 
2483  /* Note that here we test for yy_c_buf_p "<=" to the position
2484  * of the first EOB in the buffer, since yy_c_buf_p will
2485  * already have been incremented past the NUL character
2486  * (since all states make transitions on EOB to the
2487  * end-of-buffer state). Contrast this with the test
2488  * in input().
2489  */
2490  if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2491  { /* This was really a NUL. */
2492  yy_state_type yy_next_state;
2493 
2494  yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text;
2495 
2496  yy_current_state = yy_get_previous_state();
2497 
2498  /* Okay, we're now positioned to make the NUL
2499  * transition. We couldn't have
2500  * yy_get_previous_state() go ahead and do it
2501  * for us because it doesn't know how to deal
2502  * with the possibility of jamming (and we don't
2503  * want to build jamming into it because then it
2504  * will run more slowly).
2505  */
2506 
2507  yy_next_state = yy_try_NUL_trans( yy_current_state );
2508 
2510 
2511  if ( yy_next_state )
2512  {
2513  /* Consume the NUL. */
2514  yy_cp = ++yy_c_buf_p;
2515  yy_current_state = yy_next_state;
2516  goto yy_match;
2517  }
2518 
2519  else
2520  {
2522  yy_current_state = yy_last_accepting_state;
2523  goto yy_find_action;
2524  }
2525  }
2526 
2527  else switch ( yy_get_next_buffer() )
2528  {
2529  case EOB_ACT_END_OF_FILE:
2530  {
2532 
2533  if ( yywrap() )
2534  {
2535  /* Note: because we've taken care in
2536  * yy_get_next_buffer() to have set up
2537  * yytext, we can now set up
2538  * yy_c_buf_p so that if some total
2539  * hoser (like flex itself) wants to
2540  * call the scanner after we return the
2541  * YY_NULL, it'll still work - another
2542  * YY_NULL will get returned.
2543  */
2545 
2547  goto do_action;
2548  }
2549 
2550  else
2551  {
2553  YY_NEW_FILE;
2554  }
2555  break;
2556  }
2557 
2558  case EOB_ACT_CONTINUE_SCAN:
2559  yy_c_buf_p =
2560  yytext_ptr + yy_amount_of_matched_text;
2561 
2562  yy_current_state = yy_get_previous_state();
2563 
2564  yy_cp = yy_c_buf_p;
2566  goto yy_match;
2567 
2568  case EOB_ACT_LAST_MATCH:
2569  yy_c_buf_p =
2570  &yy_current_buffer->yy_ch_buf[yy_n_chars];
2571 
2572  yy_current_state = yy_get_previous_state();
2573 
2574  yy_cp = yy_c_buf_p;
2576  goto yy_find_action;
2577  }
2578  break;
2579  }
2580 
2581  default:
2583  "fatal flex scanner internal error--no action found" );
2584  } /* end of action switch */
2585  } /* end of scanning one token */
unsigned char YY_CHAR
Definition: libparse.cc:284
static yyconst short int yy_def[533]
Definition: libparse.cc:470
#define yytext_ptr
Definition: libparse.cc:288
#define YY_BREAK
Definition: libparse.cc:1402
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
#define ECHO
Definition: libparse.cc:1343
#define yywrap
Definition: libparse.cc:17
#define pstr
Definition: libparse.cc:1246
unsigned char * proc[NUM_PROC]
Definition: checklibs.c:16
VAR BOOLEAN p_static
Definition: libparse.cc:1094
#define pexample
Definition: libparse.cc:1248
#define SET_EXAMPLE_START(mode, pi, l, p)
Definition: libparse.cc:1176
void make_version(char *p, int what)
Definition: libparse.cc:3386
STATIC_VAR yy_state_type yy_last_accepting_state
Definition: libparse.cc:1037
VAR int old_state
Definition: libparse.cc:1095
VAR int found_info
Definition: libparse.cc:1108
#define pestr
Definition: libparse.cc:1250
#define IncrCheckSum(c)
Definition: libparse.cc:1191
#define EOB_ACT_LAST_MATCH
Definition: libparse.cc:126
#define yytext
Definition: libparse.cc:16
#define YY_START
Definition: libparse.cc:105
#define FALSE
Definition: auxiliary.h:96
VAR int yylp_errno
Definition: libparse.cc:1130
#define yyleng
Definition: libparse.cc:12
register int yy_act
Definition: libparse.cc:1415
VAR int check
Definition: libparse.cc:1106
#define string
Definition: libparse.cc:1252
procinfo * iiInitSingularProcinfo(procinfov pi, const char *libname, const char *procname, int, long pos, BOOLEAN pstatic)
Definition: iplib.cc:992
#define YY_AT_BOL()
Definition: libparse.cc:282
#define phead
Definition: libparse.cc:1238
#define YY_RESTORE_YY_MORE_OFFSET
Definition: libparse.cc:1048
#define TRUE
Definition: auxiliary.h:100
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
VAR int lpverbose
Definition: libparse.cc:1106
void * ADDRESS
Definition: auxiliary.h:135
#define pdef
Definition: libparse.cc:1236
#define BEGIN
Definition: libparse.cc:99
void push(const char *p, char *libname)
Definition: iplib.cc:1444
VAR int texinfo_out
Definition: libparse.cc:1107
BOOLEAN piKill(procinfov pi)
Definition: ipid.cc:664
static int yy_get_next_buffer()
Definition: libparse.cc:2597
#define libcmd
Definition: libparse.cc:1232
#define SET_BODY_START(mode, pi, l, p)
Definition: libparse.cc:1163
#define yyless(n)
Definition: libparse.cc:3250
static yyconst int yy_ec[256]
Definition: libparse.cc:365
#define YY_STATE_EOF(state)
Definition: libparse.cc:109
int current_pos(int i)
Definition: libparse.cc:3346
#define EOB_ACT_END_OF_FILE
Definition: libparse.cc:125
#define IDPACKAGE(a)
Definition: ipid.h:134
#define poldhelp
Definition: libparse.cc:1240
VAR int brace3
Definition: libparse.cc:1091
idhdl enterid(const char *s, int lev, int t, idhdl *root, BOOLEAN init, BOOLEAN search)
Definition: ipid.cc:265
#define YYLP_BAD_CHAR
Definition: libparse.h:93
#define YYLP_BODY_TMBR2
Definition: libparse.h:89
static yy_state_type yy_get_previous_state()
Definition: libparse.cc:2729
VAR int found_cat
Definition: libparse.cc:1109
#define SET_DEF_END(mode, pi, p)
Definition: libparse.cc:1155
#define comment
Definition: libparse.cc:1254
register char * yy_cp
Definition: libparse.cc:1414
static yy_state_type yy_try_NUL_trans(yy_state_type yy_current_state)
Definition: libparse.cc:2765
static yyconst short int yy_base[533]
Definition: libparse.cc:407
VAR int brace2
Definition: libparse.cc:1090
#define omFree(addr)
Definition: omAllocDecl.h:261
VAR int yylplineno
Definition: libparse.cc:1104
#define YYLP_EX_BR3
Definition: libparse.h:92
VAR int found_oldhelp
Definition: libparse.cc:1111
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
#define YY_BUFFER_NORMAL
Definition: libparse.cc:207
STATIC_VAR int yy_more_flag
Definition: libparse.cc:1044
static yyconst short int yy_accept[485]
Definition: libparse.cc:308
void * malloc(size_t size)
Definition: omalloc.c:92
#define YYLP_BODY_BR3
Definition: libparse.h:88
STATIC_VAR int yy_more_len
Definition: libparse.cc:1045
VAR int found_version
Definition: libparse.cc:1110
#define category
Definition: libparse.cc:1258
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
#define YYLP_BODY_BR2
Definition: libparse.h:87
#define SET_BODY_END(mode, pi, p)
Definition: libparse.cc:1169
#define info
Definition: libparse.cc:1256
VAR char libnamebuf[1024]
Definition: libparse.cc:1098
#define url
Definition: libparse.cc:1260
#define INITIAL
Definition: libparse.cc:1051
VAR int brace1
Definition: libparse.cc:1089
#define YY_DO_BEFORE_ACTION
Definition: libparse.cc:298
VAR package currPack
Definition: ipid.cc:57
#define yyin
Definition: libparse.cc:11
#define version
Definition: libparse.cc:1262
#define EOB_ACT_CONTINUE_SCAN
Definition: libparse.cc:124
VAR idhdl h0
Definition: libparse.cc:1143
#define help
Definition: libparse.cc:1230
STATIC_VAR int yy_did_buffer_switch_on_eof
Definition: libparse.cc:246
VAR lib_cmds last_cmd
Definition: libparse.cc:1096
#define BVERBOSE(a)
Definition: options.h:34
VAR int quote
Definition: libparse.cc:1092
#define V_LOAD_PROC
Definition: options.h:48
#define IDPROC(a)
Definition: ipid.h:135
#define header
Definition: libparse.cc:1228
#define pi
Definition: libparse.cc:1145
#define YY_SC_TO_UI(c)
Definition: libparse.cc:93
register char * yy_bp
Definition: libparse.cc:1414
#define SET_HELP_END(mode, pi, p)
Definition: libparse.cc:1159
VAR package basePack
Definition: ipid.cc:58
#define SET_PROC_END(mode, pi, p)
Definition: libparse.cc:1182
VAR long string_start
Definition: libparse.cc:1100
#define NULL
Definition: omList.c:12
static yyconst int yy_meta[53]
Definition: libparse.cc:397
#define YYLP_DEF_BR2
Definition: libparse.h:86
int yy_state_type
Definition: libparse.cc:286
#define YY_END_OF_BUFFER
Definition: libparse.cc:307
#define YYLP_BODY_TMBR3
Definition: libparse.h:90
#define pbody
Definition: libparse.cc:1244
#define YY_MORE_ADJ
Definition: libparse.cc:1047
#define yymore()
Definition: libparse.cc:1046
#define YYLP_EX_BR2
Definition: libparse.h:91
#define phelp
Definition: libparse.cc:1242
#define SET_HELP_START(mode, pi, p)
Definition: libparse.cc:1157
void omMarkAsStaticAddr(void *addr)
static yyconst short int yy_chk[2253]
Definition: libparse.cc:785
#define YY_RULE_SETUP
Definition: libparse.cc:1405
#define YY_NEW_FILE
Definition: libparse.cc:112
STATIC_VAR char * yy_last_accepting_cpos
Definition: libparse.cc:1038
#define YYSTATE
Definition: libparse.cc:106
EXTERN_VAR libstackv library_stack
Definition: libparse.cc:1150
VAR char * text_buffer
Definition: libparse.cc:1099
void copy_string(lp_modes mode)
Definition: libparse.cc:3406
#define YY_BUFFER_NEW
Definition: libparse.cc:206
VAR int found_proc_in_proc
Definition: libparse.cc:1112
VAR idhdl h_top
Definition: libparse.cc:1144
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221
STATIC_VAR int yy_start
Definition: libparse.cc:241
#define libcmd2
Definition: libparse.cc:1234
#define yyterminate()
Definition: libparse.cc:1373
static yyconst short int yy_nxt[2253]
Definition: libparse.cc:533
#define Warn
Definition: emacs.cc:77
#define omStrDup(s)
Definition: omAllocDecl.h:263

◆ yy_create_buffer()

YY_BUFFER_STATE yy_create_buffer ( FILE *  file,
int  size 
)

Definition at line 2971 of file libparse.cc.

2977  {
2978  YY_BUFFER_STATE b;
2979 
2980  b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
2981  if ( ! b )
2982  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2983 
2984  b->yy_buf_size = size;
2985 
2986  /* yy_ch_buf has to be 2 characters longer than the size given because
2987  * we need to put in 2 end-of-buffer characters.
2988  */
2989  b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 );
2990  if ( ! b->yy_ch_buf )
2991  YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
2992 
2993  b->yy_is_our_buffer = 1;
2994 
2995  yy_init_buffer( b, file );
2996 
2997  return b;
2998  }
CanonicalForm b
Definition: cfModGcd.cc:4044
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
static void * yy_flex_alloc(yy_size_t size)
Definition: libparse.cc:3299
#define yy_init_buffer
Definition: libparse.cc:7

◆ yy_delete_buffer()

void yy_delete_buffer ( YY_BUFFER_STATE  b)

Definition at line 3002 of file libparse.cc.

3007  {
3008  if ( ! b )
3009  return;
3010 
3011  if ( b == yy_current_buffer )
3012  yy_current_buffer = (YY_BUFFER_STATE) 0;
3013 
3014  if ( b->yy_is_our_buffer )
3015  yy_flex_free( (void *) b->yy_ch_buf );
3016 
3017  yy_flex_free( (void *) b );
3018  }
CanonicalForm b
Definition: cfModGcd.cc:4044
static void yy_flex_free(void *ptr)
Definition: libparse.cc:3327
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yy_fatal_error()

static void yy_fatal_error ( yyconst char  msg[])
static

Definition at line 3235 of file libparse.cc.

3240  {
3241  (void) fprintf( stderr, "%s\n", msg );
3242  exit( YY_EXIT_FAILURE );
3243  }
#define YY_EXIT_FAILURE
Definition: libparse.cc:3231

◆ yy_flex_alloc()

static void* yy_flex_alloc ( yy_size_t  size)
static

Definition at line 3299 of file libparse.cc.

3304  {
3305  return (void *) malloc( size );
3306  }
void * malloc(size_t size)
Definition: omalloc.c:92
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600

◆ yy_flex_free()

static void yy_flex_free ( void *  ptr)
static

Definition at line 3327 of file libparse.cc.

3332  {
3333  free( ptr );
3334  }
#define free
Definition: omAllocFunc.c:14

◆ yy_flex_realloc()

static void* yy_flex_realloc ( void *  ptr,
yy_size_t  size 
)
static

Definition at line 3309 of file libparse.cc.

3315  {
3316  /* The cast to (char *) in the following accommodates both
3317  * implementations that use char* generic pointers, and those
3318  * that use void* generic pointers. It works with the latter
3319  * because both ANSI C and C++ allow castless assignment from
3320  * any pointer type to void*, and deal with argument conversions
3321  * as though doing an assignment.
3322  */
3323  return (void *) realloc( (char *) ptr, size );
3324  }
#define realloc
Definition: omAllocFunc.c:16
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600

◆ yy_flush_buffer()

void yy_flush_buffer ( YY_BUFFER_STATE  b)

Definition at line 3055 of file libparse.cc.

3061  {
3062  if ( ! b )
3063  return;
3064 
3065  b->yy_n_chars = 0;
3066 
3067  /* We always need two end-of-buffer characters. The first causes
3068  * a transition to the end-of-buffer state. The second causes
3069  * a jam in that state.
3070  */
3071  b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR;
3072  b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR;
3073 
3074  b->yy_buf_pos = &b->yy_ch_buf[0];
3075 
3076  b->yy_at_bol = 1;
3077  b->yy_buffer_status = YY_BUFFER_NEW;
3078 
3079  if ( b == yy_current_buffer )
3081  }
#define yy_load_buffer_state
Definition: libparse.cc:9
#define YY_END_OF_BUFFER_CHAR
Definition: libparse.cc:114
CanonicalForm b
Definition: cfModGcd.cc:4044
#define YY_BUFFER_NEW
Definition: libparse.cc:206
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yy_get_next_buffer()

static int yy_get_next_buffer ( )
static

Definition at line 2597 of file libparse.cc.

2598  {
2599  register char *dest = yy_current_buffer->yy_ch_buf;
2600  register char *source = yytext_ptr;
2601  register int number_to_move, i;
2602  int ret_val;
2603 
2604  if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
2606  "fatal flex scanner internal error--end of buffer missed" );
2607 
2608  if ( yy_current_buffer->yy_fill_buffer == 0 )
2609  { /* Don't try to fill the buffer, so this is an EOF. */
2610  if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 )
2611  {
2612  /* We matched a single character, the EOB, so
2613  * treat this as a final EOF.
2614  */
2615  return EOB_ACT_END_OF_FILE;
2616  }
2617 
2618  else
2619  {
2620  /* We matched some text prior to the EOB, first
2621  * process it.
2622  */
2623  return EOB_ACT_LAST_MATCH;
2624  }
2625  }
2626 
2627  /* Try to read more data. */
2628 
2629  /* First move last chars to start of buffer. */
2630  number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1;
2631 
2632  for ( i = 0; i < number_to_move; ++i )
2633  *(dest++) = *(source++);
2634 
2635  if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING )
2636  /* don't do the read, it's not guaranteed to return an EOF,
2637  * just force an EOF
2638  */
2639  yy_current_buffer->yy_n_chars = yy_n_chars = 0;
2640 
2641  else
2642  {
2643  int num_to_read =
2644  yy_current_buffer->yy_buf_size - number_to_move - 1;
2645 
2646  while ( num_to_read <= 0 )
2647  { /* Not enough room in the buffer - grow it. */
2648 #ifdef YY_USES_REJECT
2650 "input buffer overflow, can't enlarge buffer because scanner uses REJECT" );
2651 #else
2652 
2653  /* just a shorter name for the current buffer */
2654  YY_BUFFER_STATE b = yy_current_buffer;
2655 
2656  int yy_c_buf_p_offset =
2657  (int) (yy_c_buf_p - b->yy_ch_buf);
2658 
2659  if ( b->yy_is_our_buffer )
2660  {
2661  int new_size = b->yy_buf_size * 2;
2662 
2663  if ( new_size <= 0 )
2664  b->yy_buf_size += b->yy_buf_size / 8;
2665  else
2666  b->yy_buf_size *= 2;
2667 
2668  b->yy_ch_buf = (char *)
2669  /* Include room in for 2 EOB chars. */
2670  yy_flex_realloc( (void *) b->yy_ch_buf,
2671  b->yy_buf_size + 2 );
2672  }
2673  else
2674  /* Can't grow it, we don't own it. */
2675  b->yy_ch_buf = 0;
2676 
2677  if ( ! b->yy_ch_buf )
2679  "fatal error - scanner input buffer overflow" );
2680 
2681  yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset];
2682 
2683  num_to_read = yy_current_buffer->yy_buf_size -
2684  number_to_move - 1;
2685 #endif
2686  }
2687 
2688  if ( num_to_read > YY_READ_BUF_SIZE )
2689  num_to_read = YY_READ_BUF_SIZE;
2690 
2691  /* Read in more data. */
2692  YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]),
2693  yy_n_chars, num_to_read );
2694 
2695  yy_current_buffer->yy_n_chars = yy_n_chars;
2696  }
2697 
2698  if ( yy_n_chars == 0 )
2699  {
2700  if ( number_to_move == YY_MORE_ADJ )
2701  {
2702  ret_val = EOB_ACT_END_OF_FILE;
2703  yyrestart( yyin );
2704  }
2705 
2706  else
2707  {
2708  ret_val = EOB_ACT_LAST_MATCH;
2709  yy_current_buffer->yy_buffer_status =
2711  }
2712  }
2713 
2714  else
2715  ret_val = EOB_ACT_CONTINUE_SCAN;
2716 
2717  yy_n_chars += number_to_move;
2720 
2721  yytext_ptr = &yy_current_buffer->yy_ch_buf[0];
2722 
2723  return ret_val;
2724  }
#define yytext_ptr
Definition: libparse.cc:288
static void * yy_flex_realloc(void *ptr, yy_size_t size)
Definition: libparse.cc:3309
#define YY_READ_BUF_SIZE
Definition: libparse.cc:1334
#define YY_INPUT(buf, result, max_size)
Definition: libparse.cc:1205
#define EOB_ACT_LAST_MATCH
Definition: libparse.cc:126
#define YY_END_OF_BUFFER_CHAR
Definition: libparse.cc:114
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
#define EOB_ACT_END_OF_FILE
Definition: libparse.cc:125
CanonicalForm b
Definition: cfModGcd.cc:4044
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
int i
Definition: cfEzgcd.cc:125
#define yyin
Definition: libparse.cc:11
#define EOB_ACT_CONTINUE_SCAN
Definition: libparse.cc:124
#define yyrestart
Definition: libparse.cc:15
#define YY_MORE_ADJ
Definition: libparse.cc:1047
#define YY_BUFFER_EOF_PENDING
Definition: libparse.cc:218
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yy_get_previous_state()

static yy_state_type yy_get_previous_state ( )
static

Definition at line 2729 of file libparse.cc.

2730  {
2731  register yy_state_type yy_current_state;
2732  register char *yy_cp;
2733 
2734  yy_current_state = yy_start;
2735  yy_current_state += YY_AT_BOL();
2736 
2737  for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
2738  {
2739  register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
2740  if ( yy_accept[yy_current_state] )
2741  {
2742  yy_last_accepting_state = yy_current_state;
2744  }
2745  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2746  {
2747  yy_current_state = (int) yy_def[yy_current_state];
2748  if ( yy_current_state >= 485 )
2749  yy_c = yy_meta[(unsigned int) yy_c];
2750  }
2751  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2752  }
2753 
2754  return yy_current_state;
2755  }
unsigned char YY_CHAR
Definition: libparse.cc:284
static yyconst short int yy_def[533]
Definition: libparse.cc:470
#define yytext_ptr
Definition: libparse.cc:288
STATIC_VAR yy_state_type yy_last_accepting_state
Definition: libparse.cc:1037
#define YY_AT_BOL()
Definition: libparse.cc:282
static yyconst int yy_ec[256]
Definition: libparse.cc:365
register char * yy_cp
Definition: libparse.cc:1414
static yyconst short int yy_base[533]
Definition: libparse.cc:407
static yyconst short int yy_accept[485]
Definition: libparse.cc:308
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
#define YY_SC_TO_UI(c)
Definition: libparse.cc:93
static yyconst int yy_meta[53]
Definition: libparse.cc:397
int yy_state_type
Definition: libparse.cc:286
#define YY_MORE_ADJ
Definition: libparse.cc:1047
static yyconst short int yy_chk[2253]
Definition: libparse.cc:785
STATIC_VAR char * yy_last_accepting_cpos
Definition: libparse.cc:1038
STATIC_VAR int yy_start
Definition: libparse.cc:241
static yyconst short int yy_nxt[2253]
Definition: libparse.cc:533

◆ yy_init_buffer()

void yy_init_buffer ( YY_BUFFER_STATE  b,
FILE *  file 
)

Definition at line 3028 of file libparse.cc.

3036  {
3037  yy_flush_buffer( b );
3038 
3039  b->yy_input_file = file;
3040  b->yy_fill_buffer = 1;
3041 
3042 #if YY_ALWAYS_INTERACTIVE
3043  b->yy_is_interactive = 1;
3044 #else
3045 #if YY_NEVER_INTERACTIVE
3046  b->yy_is_interactive = 0;
3047 #else
3048  b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0;
3049 #endif
3050 #endif
3051  }
#define yy_flush_buffer
Definition: libparse.cc:8
CanonicalForm b
Definition: cfModGcd.cc:4044

◆ yy_load_buffer_state()

void yy_load_buffer_state ( void  )

Definition at line 2958 of file libparse.cc.

2962  {
2963  yy_n_chars = yy_current_buffer->yy_n_chars;
2964  yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos;
2965  yyin = yy_current_buffer->yy_input_file;
2967  }
#define yytext_ptr
Definition: libparse.cc:288
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
#define yyin
Definition: libparse.cc:11
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ YY_PROTO() [1/16]

void yyrestart YY_PROTO ( (FILE *input_file)  )

◆ YY_PROTO() [2/16]

void yy_switch_to_buffer YY_PROTO ( (YY_BUFFER_STATE new_buffer)  )

◆ YY_PROTO() [3/16]

static int yyinput YY_PROTO ( (void)  )

◆ YY_PROTO() [4/16]

YY_BUFFER_STATE yy_create_buffer YY_PROTO ( (FILE *file, int size )

◆ YY_PROTO() [5/16]

void yy_flush_buffer YY_PROTO ( (YY_BUFFER_STATE b )

◆ YY_PROTO() [6/16]

void yy_init_buffer YY_PROTO ( (YY_BUFFER_STATE b, FILE *file)  )

◆ YY_PROTO() [7/16]

YY_BUFFER_STATE yy_scan_buffer YY_PROTO ( (char *base, yy_size_t size )

◆ YY_PROTO() [8/16]

YY_BUFFER_STATE yy_scan_string YY_PROTO ( (yyconst char *yy_str)  )

◆ YY_PROTO() [9/16]

YY_BUFFER_STATE yy_scan_bytes YY_PROTO ( (yyconst char *bytes, int len)  )

◆ YY_PROTO() [10/16]

static void* yy_flex_alloc YY_PROTO ( (yy_size_t )
static

◆ YY_PROTO() [11/16]

static void* yy_flex_realloc YY_PROTO ( (void *, yy_size_t )
static

◆ YY_PROTO() [12/16]

static void yy_flex_free YY_PROTO ( (void *)  )
static

◆ YY_PROTO() [13/16]

static yy_state_type yy_try_NUL_trans YY_PROTO ( (yy_state_type current_state)  )
static

◆ YY_PROTO() [14/16]

static void yy_fatal_error YY_PROTO ( (yyconst char msg[])  )
static

◆ YY_PROTO() [15/16]

static void yyunput YY_PROTO ( (int c, char *buf_ptr)  )
static

◆ YY_PROTO() [16/16]

int isatty YY_PROTO ( (int)  )

◆ yy_scan_buffer()

YY_BUFFER_STATE yy_scan_buffer ( char *  base,
yy_size_t  size 
)

Definition at line 3086 of file libparse.cc.

3092  {
3093  YY_BUFFER_STATE b;
3094 
3095  if ( size < 2 ||
3098  /* They forgot to leave room for the EOB's. */
3099  return 0;
3100 
3101  b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) );
3102  if ( ! b )
3103  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" );
3104 
3105  b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */
3106  b->yy_buf_pos = b->yy_ch_buf = base;
3107  b->yy_is_our_buffer = 0;
3108  b->yy_input_file = 0;
3109  b->yy_n_chars = b->yy_buf_size;
3110  b->yy_is_interactive = 0;
3111  b->yy_at_bol = 1;
3112  b->yy_fill_buffer = 0;
3113  b->yy_buffer_status = YY_BUFFER_NEW;
3114 
3115  yy_switch_to_buffer( b );
3116 
3117  return b;
3118  }
#define yy_switch_to_buffer
Definition: libparse.cc:10
#define YY_END_OF_BUFFER_CHAR
Definition: libparse.cc:114
char N base
Definition: ValueTraits.h:144
CanonicalForm b
Definition: cfModGcd.cc:4044
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
int size(const CanonicalForm &f, const Variable &v)
int size ( const CanonicalForm & f, const Variable & v )
Definition: cf_ops.cc:600
static void * yy_flex_alloc(yy_size_t size)
Definition: libparse.cc:3299
#define YY_BUFFER_NEW
Definition: libparse.cc:206

◆ yy_scan_bytes()

YY_BUFFER_STATE yy_scan_bytes ( yyconst char *  bytes,
int  len 
)

Definition at line 3141 of file libparse.cc.

3147  {
3148  YY_BUFFER_STATE b;
3149  char *buf;
3150  yy_size_t n;
3151  int i;
3152 
3153  /* Get memory for full buffer, including space for trailing EOB's. */
3154  n = len + 2;
3155  buf = (char *) yy_flex_alloc( n );
3156  if ( ! buf )
3157  YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" );
3158 
3159  for ( i = 0; i < len; ++i )
3160  buf[i] = bytes[i];
3161 
3162  buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR;
3163 
3164  b = yy_scan_buffer( buf, n );
3165  if ( ! b )
3166  YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" );
3167 
3168  /* It's okay to grow etc. this buffer, and we should throw it
3169  * away when we're done.
3170  */
3171  b->yy_is_our_buffer = 1;
3172 
3173  return b;
3174  }
unsigned int yy_size_t
Definition: libparse.cc:161
#define YY_END_OF_BUFFER_CHAR
Definition: libparse.cc:114
CanonicalForm b
Definition: cfModGcd.cc:4044
int status int void * buf
Definition: si_signals.h:59
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
#define yy_scan_buffer
Definition: libparse.cc:3
int i
Definition: cfEzgcd.cc:125
static void * yy_flex_alloc(yy_size_t size)
Definition: libparse.cc:3299

◆ yy_scan_string()

YY_BUFFER_STATE yy_scan_string ( yyconst char *  yy_str)

Definition at line 3124 of file libparse.cc.

3129  {
3130  int len;
3131  for ( len = 0; yy_str[len]; ++len )
3132  ;
3133 
3134  return yy_scan_bytes( yy_str, len );
3135  }
#define yy_scan_bytes
Definition: libparse.cc:5

◆ yy_switch_to_buffer()

void yy_switch_to_buffer ( YY_BUFFER_STATE  new_buffer)

Definition at line 2928 of file libparse.cc.

2933  {
2934  if ( yy_current_buffer == new_buffer )
2935  return;
2936 
2937  if ( yy_current_buffer )
2938  {
2939  /* Flush out information for old buffer. */
2941  yy_current_buffer->yy_buf_pos = yy_c_buf_p;
2942  yy_current_buffer->yy_n_chars = yy_n_chars;
2943  }
2944 
2945  yy_current_buffer = new_buffer;
2947 
2948  /* We don't actually know whether we did this switch during
2949  * EOF (yywrap()) processing, but the only time this flag
2950  * is looked at is after yywrap() is called, so it's safe
2951  * to go ahead and always set it.
2952  */
2954  }
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
#define yy_load_buffer_state
Definition: libparse.cc:9
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
STATIC_VAR int yy_did_buffer_switch_on_eof
Definition: libparse.cc:246
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yy_try_NUL_trans()

static yy_state_type yy_try_NUL_trans ( yy_state_type  yy_current_state)
static

Definition at line 2765 of file libparse.cc.

2770  {
2771  register int yy_is_jam;
2772  register char *yy_cp = yy_c_buf_p;
2773 
2774  register YY_CHAR yy_c = 1;
2775  if ( yy_accept[yy_current_state] )
2776  {
2777  yy_last_accepting_state = yy_current_state;
2779  }
2780  while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
2781  {
2782  yy_current_state = (int) yy_def[yy_current_state];
2783  if ( yy_current_state >= 485 )
2784  yy_c = yy_meta[(unsigned int) yy_c];
2785  }
2786  yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
2787  yy_is_jam = (yy_current_state == 484);
2788 
2789  return yy_is_jam ? 0 : yy_current_state;
2790  }
unsigned char YY_CHAR
Definition: libparse.cc:284
static yyconst short int yy_def[533]
Definition: libparse.cc:470
STATIC_VAR yy_state_type yy_last_accepting_state
Definition: libparse.cc:1037
register char * yy_cp
Definition: libparse.cc:1414
static yyconst short int yy_base[533]
Definition: libparse.cc:407
static yyconst short int yy_accept[485]
Definition: libparse.cc:308
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
static yyconst int yy_meta[53]
Definition: libparse.cc:397
static yyconst short int yy_chk[2253]
Definition: libparse.cc:785
STATIC_VAR char * yy_last_accepting_cpos
Definition: libparse.cc:1038
static yyconst short int yy_nxt[2253]
Definition: libparse.cc:533

◆ yyinput()

static int yyinput ( )
static

Definition at line 2839 of file libparse.cc.

2843  {
2844  int c;
2845 
2847 
2849  {
2850  /* yy_c_buf_p now points to the character we want to return.
2851  * If this occurs *before* the EOB characters, then it's a
2852  * valid NUL; if not, then we've hit the end of the buffer.
2853  */
2854  if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] )
2855  /* This was really a NUL. */
2856  *yy_c_buf_p = '\0';
2857 
2858  else
2859  { /* need more input */
2860  int offset = yy_c_buf_p - yytext_ptr;
2861  ++yy_c_buf_p;
2862 
2863  switch ( yy_get_next_buffer() )
2864  {
2865  case EOB_ACT_LAST_MATCH:
2866  /* This happens because yy_g_n_b()
2867  * sees that we've accumulated a
2868  * token and flags that we need to
2869  * try matching the token before
2870  * proceeding. But for input(),
2871  * there's no matching to consider.
2872  * So convert the EOB_ACT_LAST_MATCH
2873  * to EOB_ACT_END_OF_FILE.
2874  */
2875 
2876  /* Reset buffer status. */
2877  yyrestart( yyin );
2878 
2879  /* fall through */
2880 
2881  case EOB_ACT_END_OF_FILE:
2882  {
2883  if ( yywrap() )
2884  return EOF;
2885 
2887  YY_NEW_FILE;
2888 #ifdef __cplusplus
2889  return yyinput();
2890 #else
2891  return input();
2892 #endif
2893  }
2894 
2895  case EOB_ACT_CONTINUE_SCAN:
2896  yy_c_buf_p = yytext_ptr + offset;
2897  break;
2898  }
2899  }
2900  }
2901 
2902  c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */
2903  *yy_c_buf_p = '\0'; /* preserve yytext */
2904  yy_hold_char = *++yy_c_buf_p;
2905 
2906  yy_current_buffer->yy_at_bol = (c == '\n');
2907 
2908  return c;
2909  }
#define yytext_ptr
Definition: libparse.cc:288
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
#define yywrap
Definition: libparse.cc:17
#define EOB_ACT_LAST_MATCH
Definition: libparse.cc:126
VAR int offset
Definition: libparse.cc:1093
#define YY_END_OF_BUFFER_CHAR
Definition: libparse.cc:114
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
static int yy_get_next_buffer()
Definition: libparse.cc:2597
#define EOB_ACT_END_OF_FILE
Definition: libparse.cc:125
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
#define yyin
Definition: libparse.cc:11
#define EOB_ACT_CONTINUE_SCAN
Definition: libparse.cc:124
static int yyinput()
Definition: libparse.cc:2839
STATIC_VAR int yy_did_buffer_switch_on_eof
Definition: libparse.cc:246
#define yyrestart
Definition: libparse.cc:15
#define YY_NEW_FILE
Definition: libparse.cc:112
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yylpwrap()

int yylpwrap ( )

Definition at line 3364 of file libparse.cc.

3365  {
3366  //printf("======================= YYWRAP ====================\n");
3367  if(brace1>0) { yylp_errno=YYLP_MISS_BR1; }
3368  if(brace2>0) { yylp_errno=YYLP_MISS_BR2; }
3369  if(brace3>0) { yylp_errno=YYLP_MISS_BR3; }
3370  if(quote>0) { yylp_errno=YYLP_MISSQUOT; }
3371  //printf("{=%d, (=%d, [=%d\n", brace1, brace2, brace3);
3372  if(feof(yyin)) return 1; else return 0;
3373  }
#define YYLP_MISS_BR2
Definition: libparse.h:96
#define YYLP_MISS_BR3
Definition: libparse.h:97
VAR int yylp_errno
Definition: libparse.cc:1130
VAR int brace3
Definition: libparse.cc:1091
VAR int brace2
Definition: libparse.cc:1090
#define YYLP_MISS_BR1
Definition: libparse.h:95
VAR int brace1
Definition: libparse.cc:1089
#define yyin
Definition: libparse.cc:11
VAR int quote
Definition: libparse.cc:1092
#define YYLP_MISSQUOT
Definition: libparse.h:94

◆ yyrestart()

void yyrestart ( FILE *  input_file)

Definition at line 2913 of file libparse.cc.

2918  {
2919  if ( ! yy_current_buffer )
2921 
2922  yy_init_buffer( yy_current_buffer, input_file );
2924  }
#define yy_load_buffer_state
Definition: libparse.cc:9
#define yy_create_buffer
Definition: libparse.cc:1
#define yyin
Definition: libparse.cc:11
#define YY_BUF_SIZE
Definition: libparse.cc:117
#define yy_init_buffer
Definition: libparse.cc:7
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

◆ yyunput()

static void yyunput ( int  c,
register char *  yy_bp 
)
static

Definition at line 2795 of file libparse.cc.

2801  {
2802  register char *yy_cp = yy_c_buf_p;
2803 
2804  /* undo effects of setting up yytext */
2805  *yy_cp = yy_hold_char;
2806 
2807  if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2808  { /* need to shift things up to make room */
2809  /* +2 for EOB chars. */
2810  register int number_to_move = yy_n_chars + 2;
2811  register char *dest = &yy_current_buffer->yy_ch_buf[
2812  yy_current_buffer->yy_buf_size + 2];
2813  register char *source =
2814  &yy_current_buffer->yy_ch_buf[number_to_move];
2815 
2816  while ( source > yy_current_buffer->yy_ch_buf )
2817  *--dest = *--source;
2818 
2819  yy_cp += (int) (dest - source);
2820  yy_bp += (int) (dest - source);
2821  yy_current_buffer->yy_n_chars =
2822  yy_n_chars = yy_current_buffer->yy_buf_size;
2823 
2824  if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
2825  YY_FATAL_ERROR( "flex scanner push-back overflow" );
2826  }
2827 
2828  *--yy_cp = (char) c;
2829 
2830 
2831  yytext_ptr = yy_bp;
2832  yy_hold_char = *yy_cp;
2833  yy_c_buf_p = yy_cp;
2834  }
#define yytext_ptr
Definition: libparse.cc:288
STATIC_VAR char yy_hold_char
Definition: libparse.cc:231
STATIC_VAR int yy_n_chars
Definition: libparse.cc:233
register char * yy_cp
Definition: libparse.cc:1414
#define YY_FATAL_ERROR(msg)
Definition: libparse.cc:1383
STATIC_VAR char * yy_c_buf_p
Definition: libparse.cc:239
register char * yy_bp
Definition: libparse.cc:1414
STATIC_VAR YY_BUFFER_STATE yy_current_buffer
Definition: libparse.cc:221

Variable Documentation

◆ brace1

VAR int brace1 = 0

Definition at line 1089 of file libparse.cc.

◆ brace2

VAR int brace2 = 0

Definition at line 1090 of file libparse.cc.

◆ brace3

VAR int brace3 = 0

Definition at line 1091 of file libparse.cc.

◆ check

VAR int check = 0

Definition at line 1106 of file libparse.cc.

◆ found_cat

VAR int found_cat =0

Definition at line 1109 of file libparse.cc.

◆ found_info

VAR int found_info =0

Definition at line 1108 of file libparse.cc.

◆ found_oldhelp

VAR int found_oldhelp = 0

Definition at line 1111 of file libparse.cc.

◆ found_proc_in_proc

VAR int found_proc_in_proc = 0

Definition at line 1112 of file libparse.cc.

◆ found_version

VAR int found_version =0

Definition at line 1110 of file libparse.cc.

◆ h0

VAR idhdl h0

Definition at line 1143 of file libparse.cc.

◆ h_top

VAR idhdl h_top

Definition at line 1144 of file libparse.cc.

◆ help_chksum

STATIC_VAR unsigned long help_chksum

Definition at line 1153 of file libparse.cc.

◆ last_cmd

VAR lib_cmds last_cmd = LP_NONE

Definition at line 1096 of file libparse.cc.

◆ libnamebuf

VAR char libnamebuf[1024]

Definition at line 1098 of file libparse.cc.

◆ library_stack

EXTERN_VAR libstackv library_stack

Definition at line 1150 of file libparse.cc.

◆ lpverbose

VAR int lpverbose = 0

Definition at line 1106 of file libparse.cc.

◆ offset

VAR int offset = 0

Definition at line 1093 of file libparse.cc.

◆ old_state

VAR int old_state = 0

Definition at line 1095 of file libparse.cc.

◆ p_static

VAR BOOLEAN p_static = FALSE

Definition at line 1094 of file libparse.cc.

◆ quote

VAR int quote = 0

Definition at line 1092 of file libparse.cc.

◆ string_start

VAR long string_start

Definition at line 1100 of file libparse.cc.

◆ texinfo_out

VAR int texinfo_out = 0

Definition at line 1107 of file libparse.cc.

◆ text_buffer

VAR char* text_buffer =NULL

Definition at line 1099 of file libparse.cc.

◆ yy_accept

yyconst short int yy_accept[485]
static

Definition at line 308 of file libparse.cc.

◆ yy_act

register int yy_act

Definition at line 1415 of file libparse.cc.

◆ yy_base

yyconst short int yy_base[533]
static

Definition at line 407 of file libparse.cc.

◆ yy_bp

register char * yy_bp

Definition at line 1414 of file libparse.cc.

◆ yy_c_buf_p

STATIC_VAR char* yy_c_buf_p = (char *) 0

Definition at line 239 of file libparse.cc.

◆ yy_chk

yyconst short int yy_chk[2253]
static

Definition at line 785 of file libparse.cc.

◆ yy_cp

register char* yy_cp

Definition at line 1414 of file libparse.cc.

◆ yy_current_buffer

STATIC_VAR YY_BUFFER_STATE yy_current_buffer = 0

Definition at line 221 of file libparse.cc.

◆ YY_DECL

YY_DECL
Initial value:
{
register yy_state_type yy_current_state
int yy_state_type
Definition: libparse.cc:286

Definition at line 1412 of file libparse.cc.

◆ yy_def

yyconst short int yy_def[533]
static

Definition at line 470 of file libparse.cc.

◆ yy_did_buffer_switch_on_eof

STATIC_VAR int yy_did_buffer_switch_on_eof

Definition at line 246 of file libparse.cc.

◆ yy_ec

yyconst int yy_ec[256]
static

Definition at line 365 of file libparse.cc.

◆ yy_hold_char

STATIC_VAR char yy_hold_char

Definition at line 231 of file libparse.cc.

◆ yy_init

STATIC_VAR int yy_init = 1

Definition at line 240 of file libparse.cc.

◆ yy_last_accepting_cpos

STATIC_VAR char* yy_last_accepting_cpos

Definition at line 1038 of file libparse.cc.

◆ yy_last_accepting_state

STATIC_VAR yy_state_type yy_last_accepting_state

Definition at line 1037 of file libparse.cc.

◆ yy_meta

yyconst int yy_meta[53]
static
Initial value:
=
{ 0,
1, 2, 3, 4, 2, 1, 5, 6, 1, 5,
1, 7, 8, 9, 5, 10, 5, 11, 5, 1,
1, 7, 7, 7, 7, 7, 1, 1, 1, 5,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7,
4, 1
}

Definition at line 397 of file libparse.cc.

◆ yy_more_flag

STATIC_VAR int yy_more_flag = 0

Definition at line 1044 of file libparse.cc.

◆ yy_more_len

STATIC_VAR int yy_more_len = 0

Definition at line 1045 of file libparse.cc.

◆ yy_n_chars

STATIC_VAR int yy_n_chars

Definition at line 233 of file libparse.cc.

◆ yy_nxt

yyconst short int yy_nxt[2253]
static

Definition at line 533 of file libparse.cc.

◆ yy_start

STATIC_VAR int yy_start = 0

Definition at line 241 of file libparse.cc.

◆ yyin

VAR FILE* yyin = (FILE *) 0

Definition at line 122 of file libparse.cc.

◆ yyleng

VAR int yyleng

Definition at line 121 of file libparse.cc.

◆ yylp_buffer_start

VAR char* yylp_buffer_start

Definition at line 1102 of file libparse.cc.

◆ yylp_errlist

const char* yylp_errlist[]
Initial value:
= {
"",
"missing close bracket ')' for proc definition in line %d.",
"missing close bracket ')' for procbody in line %d.",
"missing close bracket ']' for procbody in line %d.",
"too many ')' closed brackets in line %d.",
"too many ']' closed brackets in line %d.",
"missing close bracket ')' for example in line %d.",
"missing close bracket ']' for example in line %d.",
"cannot assign character '%c' in line %d to any group.",
"there must be a quote missing somewhere before line %d.",
"missing close bracket '}' at end of library in line %d.",
"missing close bracket ')' at end of library in line %d.",
"missing close bracket ']' at end of library in line %d.",
}
#define NULL
Definition: omList.c:12

Definition at line 1114 of file libparse.cc.

◆ yylp_errno

VAR int yylp_errno = 0

Definition at line 1130 of file libparse.cc.

◆ yylplineno

VAR int yylplineno = 1

Definition at line 1104 of file libparse.cc.

◆ yyout

VAR FILE * yyout = (FILE *) 0

Definition at line 122 of file libparse.cc.

◆ yytext

VAR char* yytext

Definition at line 287 of file libparse.cc.