Re: Implementing start conditions

Janaki S <janaki@csa.iisc.ernet.in>
19 Jun 1998 23:44:36 -0400

          From comp.compilers

Related articles
Implementing start conditions chrishdp@uclink.berkeley.edu (Chris Nokleberg) (1998-06-18)
Re: Implementing start conditions janaki@csa.iisc.ernet.in (Janaki S) (1998-06-19)
| List of all articles for this month |

From: Janaki S <janaki@csa.iisc.ernet.in>
Newsgroups: comp.compilers
Date: 19 Jun 1998 23:44:36 -0400
Organization: Compilers Central
References: 98-06-100
Keywords: lex, DFA



=> Right now I'm working on start conditions. I think there are two
=> options--using separate DFAs for each exclusive start condition, or
=> combining everything into one huge DFA and using some trickyness when
=> matching. What are the pros and cons of going either way? Would using
=> separate DFAs speed things up enough to be worth it?


I think, using multiple DFA's will be a lot better than the other
one, as it will minimise a whole load of compexity in the code and all.
You can have a stack like structure, which will store the starting
condition, as well as the state of the particular DFA, so that, it will be
easier to find the next path to be taken.


Janaki
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.