Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.compilers > #3003

Re: Please provide a learning path for mastering lexical analysis languages

From luser droog <luser.droog@gmail.com>
Newsgroups comp.compilers
Subject Re: Please provide a learning path for mastering lexical analysis languages
Date 2022-05-08 18:08 -0700
Organization Compilers Central
Message-ID <22-05-026@comp.compilers> (permalink)
References <22-05-010@comp.compilers>

Show all headers | View raw


On Friday, May 6, 2022 at 11:13:52 AM UTC-5, Roger L Costello wrote:
> Hi Folks,
>
> I want to master lexical analysis.
>
> In Chris Christopher's last post he said:
>
> > [Flex] is not even as powerful as some other lexical analysis languages
> > and even exploiting its power often requires things that cannot be
> > expressed in Flex alone nor can they be done in ways that are simple
> > and easy to reason about.
>
> I am currently in the process of mastering Flex. I feel that mastering Flex
> will give me a foundation for learning other more advanced lexical analysis
> languages. "This XYZ lexical analysis language does it this way, Flex does it
> this other way. Ah, yes, I can see how XYZ's way is simpler and more
> powerful."
>
> From Chris's post I see that there is much to learn beyond Flex. Thank you
> Chris.
>
> Can you provide a learning path, please? A learning path for mastering lexical
> analysis languages.
>
> After I master Flex, what lexical analysis language should I then master? And
> after mastering that, what is the next lexical analysis language that I should
> master?
>
> /Roger

I'd like to echo George Neuner's remark:

> it's the methods used [by] the tools that are important.

In my opinion the best way to truly "master"* such tools is to step
away from the tools per se and delve into the algorithms and data
structures involved. The best book for this (again, in my opinion) is
Marvin Minsky's "Computation: Finite and Infinite Machines". He has a
whole chapter about Regular Languages and their association with
Finite State Automata and the algorithms for translating back and
forth between a Regular Expression and its corresponding Finite State
Automaton.

And to really get a handle on when to use flex vs bison vs whatever
other tool, you'll also need to know something about where Regular
Languages sit in the Chomsky Hierarchy of Phrase Structured Languages.
I'm not sure what the best resource is for this part. Chomsky's
writings on linguistics are formidable for the non-specialist (even
for very motivated amateurs) so I don't really recommend going
straight to the source. Maybe the intro chapter from the Dragon Book.
Or whatever Aho or Ullman has written on it.

* of course using my own private definition of mastery.

Back to comp.compilers | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Please provide a learning path for mastering lexical analysis languages Roger L Costello <costello@mitre.org> - 2022-05-06 11:59 +0000
  Re: Please provide a learning path for mastering lexical analysis languages George Neuner <gneuner2@comcast.net> - 2022-05-08 12:52 -0400
    Re: Please provide a learning path for mastering lexical analysis languages Paul B Mann <parser.generator.guy@gmail.com> - 2022-05-08 22:27 -0700
    Re: Please provide a learning path for mastering lexical analysis languages Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2022-05-22 12:12 +0300
  Re: Please provide a learning path for mastering lexical analysis languages luser droog <luser.droog@gmail.com> - 2022-05-08 18:08 -0700
  Re: Please provide a learning path for mastering lexical analysis languages gah4 <gah4@u.washington.edu> - 2022-05-13 13:42 -0700

csiph-web