1. A method comprising: generating a first finite-state automaton from a set of rules associated with a context-free grammar; generating a second finite-state automaton based on the first finite-state automaton, wherein the second finite-state automaton defines a delayed acceptor for a plurality of non-terminal symbols of the context-free grammar; generating a third finite-state automaton associated with a topology of the context-free grammar as the context-free grammar is applied to an input string of symbols, wherein the topology defines an application of the context-free grammar; and modifying, via a processor, the third finite-state automaton by: identifying, for each edge of a plurality of edges of the third finite-state automaton, a non-terminal symbol of the plurality of non-terminal symbols; and replacing the each edge of the plurality of edges of the third finite-state automaton with an edge of the second finite-state automaton based on the non-terminal symbol for each edge.
1. A method comprising: generating a first finite-state automaton from a set of rules associated with a context-free grammar; generating a second finite-state automaton based on the first finite-state automaton, wherein the second finite-state automaton defines a delayed acceptor for a plurality of non-terminal symbols of the context-free grammar; generating a third finite-state automaton associated with a topology of the context-free grammar as the context-free grammar is applied to an input string of symbols, wherein the topology defines an application of the context-free grammar; and modifying, via a processor, the third finite-state automaton by: identifying, for each edge of a plurality of edges of the third finite-state automaton, a non-terminal symbol of the plurality of non-terminal symbols; and replacing the each edge of the plurality of edges of the third finite-state automaton with an edge of the second finite-state automaton based on the non-terminal symbol for each edge. 2. The method of claim 1 , wherein each edge of the plurality of edges extends between an initial state and a final state, wherein the initial state and the final state are defined based on the topology.