My Project
debian-1:4.1.1-p2+ds-4build1
Singular
fevoices.h
Go to the documentation of this file.
1
#ifndef FEVOICES_H
2
#define FEVOICES_H
3
/****************************************
4
* * Computer Algebra System SINGULAR *
5
* ****************************************/
6
/*
7
* * ABSTRACT: class Voice
8
* */
9
10
#include "
reporter/reporter.h
"
11
12
#include "
resources/feResource.h
"
13
14
#include "
kernel/structs.h
"
15
16
enum
feBufferTypes
17
{
18
BT_none
= 0,
// entry level
19
BT_break
= 1,
// while, for
20
BT_proc
,
// proc
21
BT_example
,
// example
22
BT_file
,
// <"file"
23
BT_execute
,
// execute
24
BT_if
,
// if
25
BT_else
// else
26
};
27
28
enum
feBufferInputs
29
{
30
BI_stdin
= 1,
31
BI_buffer
,
32
BI_file
33
};
34
enum
noeof_t
35
{
36
noeof_brace
= 1,
37
noeof_asstring
,
38
noeof_block
,
39
noeof_bracket
,
40
noeof_comment
,
41
noeof_procname
,
42
noeof_string
43
};
/* for scanner.l */
44
45
extern
int
yylineno
;
46
extern
char
my_yylinebuf
[80];
47
extern
const
char
sNoName_fe
[];
48
49
#ifdef __cplusplus
50
51
/* the C++-part: */
52
53
// LANG_TOP : Toplevel package only
54
// LANG_SINGULAR:
55
// LANG_C :
56
//
57
58
class
Voice
59
{
60
public
:
61
Voice
*
next
;
62
Voice
*
prev
;
63
char
*
filename
;
// file name or proc name
64
procinfo
*
pi
;
// proc info
65
void
*
oldb
;
// internal scanner buffer
66
// for files only:
67
FILE *
files
;
// file handle
68
// for buffers only:
69
char
*
buffer
;
// buffer pointer
70
long
fptr
;
// current position in buffer
71
long
ftellptr
;
// with glibc 2.22, file position gets lost
72
// in sig_chld_hdl (ssi:ffork link), see examples/waitall.sing
73
74
int
start_lineno
;
// lineno, to restore in recursion
75
int
curr_lineno
;
// current lineno
76
feBufferInputs
sw
;
// BI_stdin: read from STDIN
77
// BI_buffer: buffer
78
// BI_file: files
79
char
ifsw
;
// if-switch:
80
/*1 ifsw==0: no if statement, else is invalid
81
* ==1: if (0) processed, execute else
82
* ==2: if (1) processed, else allowed but not executed
83
*/
84
feBufferTypes
typ
;
// buffer type: see BT_..
85
86
Voice
() { memset(
this
,0,
sizeof
(*
this
));}
87
feBufferTypes
Typ
();
88
void
Next
();
89
} ;
90
91
extern
Voice
*
currentVoice
;
92
93
Voice
*
feInitStdin
(
Voice
*
pp
);
94
95
const
char
*
VoiceName
();
96
void
VoiceBackTrack
();
97
BOOLEAN
contBuffer
(
feBufferTypes
typ);
98
BOOLEAN
exitBuffer
(
feBufferTypes
typ);
99
BOOLEAN
exitVoice
();
100
void
monitor
(
void
*F,
int
mode);
/* FILE*, int */
101
BOOLEAN
newFile
(
char
* fname);
102
void
newBuffer
(
char
*
s
,
feBufferTypes
t,
procinfo
*pname =
NULL
,
int
start_lineno = 0);
103
void
*
myynewbuffer
();
104
void
myyoldbuffer
(
void
* oldb);
105
106
#endif
107
#endif
108
monitor
void monitor(void *F, int mode)
Definition:
febase.cc:66
VoiceName
const char * VoiceName()
Definition:
fevoices.cc:55
VoiceBackTrack
void VoiceBackTrack()
Definition:
fevoices.cc:66
Voice::buffer
char * buffer
Definition:
fevoices.h:68
noeof_asstring
Definition:
fevoices.h:36
feInitStdin
Voice * feInitStdin(Voice *pp)
Definition:
fevoices.cc:654
BT_none
Definition:
fevoices.h:18
Voice::Next
void Next()
Definition:
fevoices.cc:83
noeof_t
noeof_t
Definition:
fevoices.h:33
Voice::Typ
feBufferTypes Typ()
Definition:
fevoices.cc:100
BT_execute
Definition:
fevoices.h:23
noeof_procname
Definition:
fevoices.h:40
contBuffer
BOOLEAN contBuffer(feBufferTypes typ)
Definition:
fevoices.cc:293
BT_proc
Definition:
fevoices.h:20
Voice::curr_lineno
int curr_lineno
Definition:
fevoices.h:74
BT_file
Definition:
fevoices.h:22
procinfo
Definition:
subexpr.h:52
currentVoice
Voice * currentVoice
Definition:
fevoices.cc:46
Voice::filename
char * filename
Definition:
fevoices.h:62
Voice::ifsw
char ifsw
Definition:
fevoices.h:78
noeof_bracket
Definition:
fevoices.h:38
reporter.h
BT_example
Definition:
fevoices.h:21
myynewbuffer
void * myynewbuffer()
Definition:
scanner.cc:2315
my_yylinebuf
char my_yylinebuf[80]
Definition:
febase.cc:42
BT_else
Definition:
fevoices.h:25
BI_buffer
Definition:
fevoices.h:30
feBufferInputs
feBufferInputs
Definition:
fevoices.h:27
BOOLEAN
int BOOLEAN
Definition:
auxiliary.h:85
Voice::pi
procinfo * pi
Definition:
fevoices.h:63
structs.h
Voice::typ
feBufferTypes typ
Definition:
fevoices.h:83
exitVoice
BOOLEAN exitVoice()
Definition:
fevoices.cc:330
sNoName_fe
const char sNoName_fe[]
Definition:
fevoices.cc:54
exitBuffer
BOOLEAN exitBuffer(feBufferTypes typ)
Definition:
fevoices.cc:225
Voice::next
Voice * next
Definition:
fevoices.h:60
Voice::prev
Voice * prev
Definition:
fevoices.h:61
BI_stdin
Definition:
fevoices.h:29
Voice::start_lineno
int start_lineno
Definition:
fevoices.h:73
BT_break
Definition:
fevoices.h:19
noeof_brace
Definition:
fevoices.h:35
pp
CanonicalForm pp(const CanonicalForm &)
CanonicalForm pp ( const CanonicalForm & f )
Definition:
cf_gcd.cc:253
noeof_block
Definition:
fevoices.h:37
myyoldbuffer
void myyoldbuffer(void *oldb)
Definition:
scanner.cc:2322
Voice::oldb
void * oldb
Definition:
fevoices.h:64
feBufferTypes
feBufferTypes
Definition:
fevoices.h:15
newFile
BOOLEAN newFile(char *fname)
Definition:
fevoices.cc:118
Voice::Voice
Voice()
Definition:
fevoices.h:85
Voice
Definition:
fevoices.h:57
noeof_string
Definition:
fevoices.h:41
Voice::files
FILE * files
Definition:
fevoices.h:66
NULL
#define NULL
Definition:
omList.c:9
BT_if
Definition:
fevoices.h:24
feResource.h
s
const CanonicalForm int s
Definition:
facAbsFact.cc:55
Voice::ftellptr
long ftellptr
Definition:
fevoices.h:70
noeof_comment
Definition:
fevoices.h:39
BI_file
Definition:
fevoices.h:31
newBuffer
void newBuffer(char *s, feBufferTypes t, procinfo *pname=NULL, int start_lineno=0)
Definition:
fevoices.cc:155
Voice::fptr
long fptr
Definition:
fevoices.h:69
Voice::sw
feBufferInputs sw
Definition:
fevoices.h:75
yylineno
int yylineno
Definition:
febase.cc:39
Generated on Wed Jan 29 2020 08:34:04 for My Project by
doxygen 1.8.16
for
Singular debian-1:4.1.1-p2+ds-4build1