20 {
namespace interpreter
57 const char*
name_of(id_type nr)
const{
return name_tab[nr];}
58 bool knows(
const char*
name)
const;
60 id_type
match(
const char*s,
size_t l){
return do_match(s,l,
true);}
62 {
return do_match(s,std::strlen(s),
false);}
64 static const id_type initial_hash_mod=97;
65 id_type
hash(
const char*s,
size_t l)
const;
66 id_type do_match(
const char*s,
size_t l,
bool copy_string);
67 size_t max_fill()
const{
return static_cast<id_type
>(mod*3L/4);}
74 {
typedef char*(*rl_type)(
const char*);
76 typedef void(*add_hist_type)(
const char*);
110 ,rl_type rl=
nullptr,add_hist_type=
nullptr 111 ,
const char*prompt2=
"> " 112 ,
const char*def_ext=
".at");
120 bool push_file(
const char*file_name,
bool skip_seen);
122 void close_includes();
130 {
return name_of(current_file());}
133 const char*
point()
const{
return p==
nullptr?line_buffer.c_str():
p;}
136 void locate(
const char*p,
int&line,
int&column)
const;
137 #line 1009 "buffer.w" 139 (std::ostream&
out,
unsigned long l0,
int c0,
unsigned long l1,
int c1)
141 #line 1053 "buffer.w" 142 void push_prompt(
char c);
143 char top_prompt()
const;
157 {
p=
nullptr;
return '\0';}
162 {
if(
p!=
nullptr and
p>line_buffer.data())
const std::string & input_path_component(unsigned int i)
Definition: main.cpp:143
const size_t block_size
Definition: buffer.h:33
id_type mod
Definition: buffer.h:48
String_pool & operator=(const String_pool &)
Definition: sl_list.h:1258
uA p
Definition: lists.cpp:26
id_type nr_entries() const
Definition: buffer.h:56
id_type match(const char *s, size_t l)
Definition: buffer.h:60
#define shift()
Definition: cweave.c:116
const String_pool * prev
Definition: buffer.h:37
char * point
Definition: buffer.h:35
std::vector< id_type > hash_tab
Definition: buffer.h:49
size_type size() const
Definition: sl_list.h:959
int length
Definition: common.c:103
unsigned int input_path_size()
Definition: main.cpp:139
size_t chars_left
Definition: buffer.h:36
~String_pool()
Definition: buffer.cpp:37
id_type match_literal(const char *s)
Definition: buffer.h:61
static const id_type empty
Definition: buffer.h:45
static const size_t default_block_size
Definition: buffer.h:25
BufferedInput * main_input_buffer
Definition: buffer.cpp:355
unsigned short id_type
Definition: buffer.h:44
std::vector< const char * > name_tab
Definition: buffer.h:50
String_pool(size_t b=default_block_size)
Definition: buffer.cpp:15
#define out(c)
Definition: cweave.c:205
char * start
Definition: buffer.h:34
id_pointer hash[hash_size]
Definition: common.c:125
char * store(const char *s, size_t length)
Definition: buffer.cpp:19
Definitions and declarations for the BitMap class.
char * name
Definition: common.c:103
size_t max_fill() const
Definition: buffer.h:67
String_pool pool
Definition: buffer.h:47
bool empty() const
Definition: sl_list.h:957
const T & back(Args &&...args) const
Definition: sl_list.h:1302
const char * name_of(id_type nr) const
Definition: buffer.h:57