Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2408
| From | Kaz Kylheku <493-878-3164@kylheku.com> |
|---|---|
| Newsgroups | comp.compilers |
| Subject | Re: Reachability of DFA part |
| Date | 2019-12-24 04:15 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <19-12-027@comp.compilers> (permalink) |
| References | <19-12-022@comp.compilers> |
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.
Back to comp.compilers | Previous | Next — Previous in thread | Find similar
Reachability of DFA part Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2019-12-23 05:52 -0500 Re: Reachability of DFA part Kaz Kylheku <493-878-3164@kylheku.com> - 2019-12-24 04:15 +0000
csiph-web