Comments (3)
it lists cases for all 254 symbols that are not \n
This has to be a bug in the IR i think - one of the existing strategies should cater for exactly that.
If you build with bmake -r DEBUG=1
:
; ~/gh/libfsm/build/bin/re -pl c '^([^\\\n]|\\t)'
re: src/libfsm/print/ir.c:422: make_state: Assertion `fsm_iscomplete(fsm, state)' failed.
zsh: abort ~/gh/libfsm/build/bin/re -pl c '^([^\\\n]|\\t)'
either that state should've been made complete, and wasn't. Or fsm_iscomplete()
is wrong.
from libfsm.
I think this is another instance of #120.
from libfsm.
Confirmed this is the same issue as #120, addressed in PR #128.
; ./build/bin/re -pl c '^([^\\\n]|\\t)'
#include <assert.h>
#include <stdio.h>
int
fsm_main(int (*fsm_getc)(void *opaque), void *opaque)
{
int c;
assert(fsm_getc != NULL);
enum {
S0, S1, S2
} state;
state = S0;
while (c = fsm_getc(opaque), c != EOF) {
switch (state) {
case S0: /* start */
switch ((unsigned char) c) {
case '\\': state = S2; break;
case '\n': return TOK_UNKNOWN;
default: state = S1; break;
}
break;
case S1: /* e.g. "a" */
break;
case S2: /* e.g. "\\" */
switch ((unsigned char) c) {
case 't': state = S1; break;
default: return TOK_UNKNOWN;
}
break;
default:
; /* unreached */
}
}
/* end states */
switch (state) {
case S1: return 0x1; /* "^([^\\\n]|\\t)" */
default: return EOF; /* unexpected EOF */
}
}
from libfsm.
Related Issues (20)
- The IR tests are currently disabled
- Attempt to build for Windows HOT 7
- bug: non-minimal DFA produced by fsm_minimise HOT 3
- CI fails for documentation build HOT 2
- lexing for pcre comments is slightly incorrect HOT 2
- retest: goasm backend is bizarrely flaky HOT 1
- Seg Fault when Using libre as Shared Library due to reg_comp Name Conflict HOT 5
- re_is_literal() is ambigious for \Z, \z, $
- We accidentally lost the ability to detect ambiguities HOT 4
- Allow escaped closing square bracket in character range
- CI fuzzing corpus "resource not accessible by integration" for PRs from external clones
- Case-insensitive regexps erroneously identified as literals
- lx: Bus error/Segmentation Fault on malformed input HOT 2
- libfsm fails to build with newer versions of bmake (versions after 2022) HOT 2
- Grammar railroad diagram HOT 1
- Add function for which characters an FSM's input must contain to match
- Feature request: Add support for embedded NUL bytes in PCRE patterns HOT 1
- RE_SINGLE (and other flags) break re_is_literal
- Unclear how to do multiple transformations in one invocation HOT 1
- Behavior of `-G length` inconsistent, moreover returns error code.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libfsm.