Re: Reachability of DFA part

Kaz Kylheku <493-878-3164@kylheku.com>
Tue, 24 Dec 2019 04:15:17 +0000 (UTC)

          From comp.compilers

Related articles
Reachability of DFA part borucki.andrzej@gmail.com (Andy) (2019-12-20)
Re: Reachability of DFA part 493-878-3164@kylheku.com (Kaz Kylheku) (2019-12-20)
Re: Reachability of DFA part borucki.andrzej@gmail.com (Andy) (2019-12-21)
Re: Reachability of DFA part DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2019-12-21)
Reachability of DFA part christopher.f.clark@compiler-resources.com (Christopher F Clark) (2019-12-23)
Re: Reachability of DFA part 493-878-3164@kylheku.com (Kaz Kylheku) (2019-12-24)
| List of all articles for this month |
From: Kaz Kylheku <493-878-3164@kylheku.com>
Newsgroups: comp.compilers
Date: Tue, 24 Dec 2019 04:15:17 +0000 (UTC)
Organization: Aioe.org NNTP Server
References: 19-12-022
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="26242"; mail-complaints-to="abuse@iecc.com"
Keywords: lex
Posted-Date: 25 Dec 2019 21:22:24 EST

On 2019-12-23, Christopher F Clark <christopher.f.clark@compiler-resources.com> wrote:
> Andy borucki.andrzej@gmail.com wrote:
>
>> Good definition would be {[^}]*}
>> Complexity of problem increases when comment ends with string
>> len >1, for example C: */ or Pascal *)
>> if we renaming : /->a *->b other->c
>> then bad definition will ab(a|b|b)*ba and good definition is
>> complicated:
>> ab(b|(a|c)*b*)*a (if I not make mistake)
>
>> Commments should maybe be defined in other way, especially
>> comments can be nested in Object Pascal.
>> Comment nesting can using stack or simply counter. I
>> see, in Pascal is using counter.
>> Difference: Pascal has two types of multiline comments { } and (* *)
>
> I'm not sure what kind of language you are trying to lex/parse, but
> the problems you are mentioning all have known solutions.


OP seems to be learning to construct a regex implementation geared
toward the generation of a lexical analyzer for any language.


Post a followup to this message

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