/keyword.h (b4cbb4e55cbb4b30581207239cdb60deb29e3bed) (2859 bytes) (mode 100644) (type blob)
#ifndef GPERF_KEYWORD_C
#define GPERF_KEYWORD_C
#include "c_fixing.h"
/*------------------------------------------------------------------------------------------------*/
#include "namespace/keyword.h"
#include "namespace/positions.h"
/*------------------------------------------------------------------------------------------------*/
/*{{{ global */
static u8 *empty_string = "";
/*}}} globals -- END */
/*------------------------------------------------------------------------------------------------*/
/*{{{ local */
static void sort_char_set(u32 *base, s32 len);
/*}}} local -- END */
/*------------------------------------------------------------------------------------------------*/
/*{{{ Keyword class */
/*{{{ constants and types */
struct Keyword {
/*----------------------------------------------------------------------------------------*/
/* data members defined immediately by the input file */
/* the keyword as a string, possibly containing NUL bytes */
u8 *allchars;
s32 allchars_length;
/* additional stuff seen on the same line of the input file */
u8 *rest;
/* line number of this keyword in the input file */
u32 lineno;
/*----------------------------------------------------------------------------------------*/
/* Ext: data members depending on the keyposition list */
/*
* the selected characters that participate for the hash function,
* selected according to the keyposition list, as a canonically
* reordered multiset
*/
u32 *selchars;
s32 selchars_length;
/*
* Chained list of keywords having the same _selchars and
* - if !option[NOLENGTH] - also the same _allchars_length.
* Note that these duplicates are not members of the main keyword list
*/
struct Keyword *duplicate_link;
/* data members used by the algorithm */
s32 hash_value; /* hash value for the keyword */
/* data members used by the output routines */
s32 final_index;
};
/*}}} constants and types -- END */
/*{{{ private static methods */
static u32 *kw_init_selchars_low(struct Keyword *t, struct Positions *positions, u32 *alpha_unify,
u32 *alpha_inc);
/*}}} private static methods */
/*{{{ public static methods */
static struct Keyword *kw_new(u8 *allchars, s32 allchars_length, u8 *rest, u32 lineno);
/* methods depending on the keyposition list */
static void kw_init_selchars_tuple(struct Keyword *t, struct Positions *positions,
u32 *alpha_unify);
static void kw_init_selchars_multiset(struct Keyword *t, struct Positions *positions,
u32 *alpha_unify, u32 *alpha_inc);
static void kw_delete_selchars(struct Keyword *t);
/*}}} public static methods -- END */
/*}}} Keyword class -- END */
#define EPILOG
#include "namespace/keyword.h"
#include "namespace/positions.h"
#undef EPILOG
/*------------------------------------------------------------------------------------------------*/
#endif
Mode |
Type |
Size |
Ref |
File |
100644 |
blob |
155 |
5b72180098c039db31d1ae3f9cfa9b58038c39e5 |
ABBREVIATIONS |
100644 |
blob |
252 |
82ea1f80bd08bdd20ebf6ff339ac4c1e6963cf54 |
CODING_STYLE |
100644 |
blob |
988 |
84b1a929903fafdfa1b89637d27f1be78091b254 |
README |
100644 |
blob |
255 |
77a9cbb244b51c8ea7271d40680e140fb61d677b |
all.c |
100644 |
blob |
2469 |
88f3c5a85178081ba8ed82cbe444e70364e8f9ac |
bool-array.c |
100644 |
blob |
1301 |
95585899ef9fa01219bb820a0fdb5bf3730d29dc |
bool-array.h |
100644 |
blob |
322 |
a581cb0d698cf4fad768d2e1d76eba8cd95ba620 |
c_fixing.h |
100644 |
blob |
2830 |
cae84c9e018be62e402986d84220972bc44faeda |
getline.c |
100644 |
blob |
803 |
3b2e9fe0fa2789429259320710193649abd8ca6c |
getline.h |
100644 |
blob |
587 |
0e9eb2b35a227500f1457e9ea4c4c0a2765f69e8 |
globals.h |
100644 |
blob |
131227 |
0b67e08b78e02b65a5b85ab33ed9d411ef89b0b0 |
gperf.pdf |
100644 |
blob |
4233 |
2df4f0b49d9c139852619af6380646847bcfaf90 |
hash-table.c |
100644 |
blob |
1637 |
1fb95e378dd619343f3b567687f63d506b8c13bc |
hash-table.h |
100644 |
blob |
980 |
74114adae41af5c48ce02167a9b408a6f1d7d1a0 |
hash.c |
100644 |
blob |
603 |
add7a1a544500039e13f99a1991e0b8a520dc7e5 |
hash.h |
100644 |
blob |
26629 |
a6784a05e9fce47bb13e9e80edcbed10cde77887 |
input.c |
100644 |
blob |
1785 |
1e14807e92c19ea7c276f137e13ac43a887142b4 |
input.h |
100644 |
blob |
4420 |
d7caf4e40dfebcc70161aaa8726586fb03e37ad9 |
keyword.c |
100644 |
blob |
2859 |
b4cbb4e55cbb4b30581207239cdb60deb29e3bed |
keyword.h |
100644 |
blob |
3200 |
d636828dba2bc4ff3c5648900fb7ef8abf7f1f7e |
keyword_list.c |
100644 |
blob |
1493 |
8ab44833fa65bd37719bf3bd6ba994e3325bb7de |
keyword_list.h |
100644 |
blob |
3490 |
a61204584054c59319978812df6869053e98e0f6 |
main.c |
040000 |
tree |
- |
2601d6e758839cb006901fccd9ef537fce13fa3a |
namespace |
100644 |
blob |
35946 |
1fb9da336b25695c248aacf3fb0079febf132bd0 |
options.c |
100644 |
blob |
6711 |
b7853ef0ce8248e2c4cd5a6349ab586201d56368 |
options.h |
100644 |
blob |
57175 |
ce761176a0e5830285d4ef3a585a01816daa579b |
output.c |
100644 |
blob |
4046 |
f0221f3f84539c2fec2f5f68df98f094c145a46e |
output.h |
100644 |
blob |
7272 |
84b2564a5a66f586f89d14e6ff09859161f24f3c |
positions.c |
100644 |
blob |
3699 |
7e1698c33ca484879b5a3454c8d9001d5cdaaaa9 |
positions.h |
100644 |
blob |
55266 |
294deac764f48ec12c61f9c5fa25d50b5863011b |
search.c |
100644 |
blob |
4728 |
2356686527da4e82877472c2b3d75d16f21dec72 |
search.h |
040000 |
tree |
- |
7e446953294cddd2cc0ff66ec0cd1b1654b4c85c |
tests |
100644 |
blob |
99 |
e4da099bacd7a88eeb2db964715d6574fc7fa81e |
version.h |
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"
Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/sylware/cgperf
Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/sylware/cgperf
Clone this repository using git:
git clone git://git.rocketgit.com/user/sylware/cgperf
You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a
merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main