diff --git a/src/linter.c b/src/linter.c index df74cd8..1cbcfec 100644 --- a/src/linter.c +++ b/src/linter.c @@ -96,14 +96,14 @@ int main(int argc, char* argv[]){ linkDots(&array, 0, 1, STRING_T, 0); // q0 --s0--> q1 linkDots(&array, 1, 2, AUTOMATE_T, 0); // q1 --a0--> q2 linkDots(&array, 2, 1, STRING_T, 2); // q2 --s2--> q1 + linkDots(&array, 1, 3, AUTOMATE_T, 0); // q1 --a0--> q3 linkDots(&array, 1, 3, STRING_T, 1); // q1 --s1--> q3 char str[40] = {0}; - strcpy(str, "[null, \"abc\", \"def\"]\0"); + strcpy(str, "[null, \"abc\", \"def\", false, true, 12, -1.2, .54, -.3, 5.]\0"); clock_t start, stop; unsigned int browsed = 0; start = clock(); browsed = browse(&array, str, 0); stop = clock(); - debug(array); printf("browse '%s' : %d/%d\n", str, browsed, (int) strlen(str)); printf(" (*) final_state: %d/%d\n", array.dCurrent, array.dFinal); diff --git a/src/test b/src/test deleted file mode 100644 index 691d728..0000000 --- a/src/test +++ /dev/null @@ -1,82 +0,0 @@ ->>> [browsing number] - > q0 --l0--> q1 ? - < yes - > q1 --a0--> q2 ? - >>> [browsing positive] - > q0 --a0--> q1 ? - >>> [browsing digit] - > q0 --r0--> q0 ? - < yes - > q1 --r0--> q0 ? - < yes - > q2 --r0--> q0 ? - < yes - > q3 --r0--> q0 ? - < yes - >>> [done digit = 0/0] - automate leads us (positive) from state 0 to 1 - < yes - > q1 --s0--> q2 ? - > q1 --s0--> q3 ? - < not - * back to q0:1 - > q0 --s0--> q2 ? - > q0 --a0--> q3 ? - >>> [browsing digit] - > q0 --r0--> q0 ? - < yes - > q1 --r0--> q0 ? - < yes - > q2 --r0--> q0 ? - < yes - > q3 --r0--> q0 ? - < yes - >>> [done digit = 0/0] - automate leads us (positive) from state 0 to 3 - < yes - < not - * back to q0:3 - >>> [done positive = 0/3] - < not - * back to q0:1 - > q0 --a0--> q2 ? - >>> [browsing positive] - > q0 --a0--> q1 ? - >>> [browsing digit] - > q0 --r0--> q0 ? - < not - * back to q0:1 - >>> [done digit = 0/0] - automate leads us (positive) from state 0 to 1 - < yes - > q1 --s0--> q2 ? - > q1 --s0--> q3 ? - < not - * back to q0:1 - > q0 --s0--> q2 ? - > q0 --a0--> q3 ? - >>> [browsing digit] - > q0 --r0--> q0 ? - < not - * back to q0:1 - >>> [done digit = 0/0] - automate leads us (positive) from state 0 to 3 - < yes - < not - * back to q0:3 - >>> [done positive = 0/3] - < not - * back to q0:2 ->>> [done number = 0/2] -browse '+1234' : 0/5 - (*) final_state: 0/2 - (*) in 20 steps - (*) in 0.000 seconds - -line/0: '