it fixes the issue Since you didn't specify the input format, I'm assuming that 0 is the initial state, any integers that appear in the second column but not the first are accepting states (3 for T1 and 2 for T2), and each row is an element of the transition relation, giving the the previous state, the next state, the input letter and the output letter. Any operation on FSTs needs to produce a new FST, so we need states, an input alphabet, an output alphabet, initial states, final states and a transition relation (the specifications of the FSTs A, B and W below are given in this order). Suppose our FSTs are:
may help you . A hand-rolled FSM can work well for simple situations, but they tend to get unwieldy as the number of states and inputs grows. There is probably no reason to change what you have already designed/implemented, but if you are interested in general-purpose text parsing techniques, you should probably look at things like regular expressions, Flex, Bison, and ANTLR.
I wish this help you A finite state transducer (FST) is a finite state automaton (FSA, FA) which produces output as well as reading input, which means it is useful for parsing (while a "bare" FSA can only be used for recognizing, i.e. pattern matching). An FST consists of a finite number of states which are linked by transitions labeled with an input/output pair. The FST starts out in a designated start state and jumps to different states depending on the input, while producing output according to its transition table.
it helps some times LALR(k) is O(N) and can be lightning fast if you reduce it to machine code for "branch on token in state to next state, stack the token value". It is unclear what you'd gain by trying to develop your idea out; how would be it be faster than that? [What tends to matter the the most isn't parsing; it is usually the rate at which you can build lexemes, esp. eliminating white space].
it fixes the issue For input 11 you start (as always) in state 0. The transition labeled 1/0 takes you to state 1, reads the first 1 from the input and outputs 0. Now there is one 1 of your input left, so you take 1/1 to state 0.