Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] presentation wish list
- Date: Tue, 14 Oct 2014 08:26:04 +0200
- From: Benjamin Kowarsch <trijezdci@example.com>
- Subject: Re: [tlug] presentation wish list
- References: <CADR0rnfUqZyOa4v-WeVCX3N+vgih8q0hXUe307W8Oxz3thVjqQ@mail.gmail.com> <543BB1BA.7080006@extellisys.com> <CADR0rndoYB6UoG2r=T_6=+7j2oyk0Nx+DrSjf9i1n6KctoLE0A@mail.gmail.com> <CAO1ZPNFN=AFYwvWaprmy_3s=WK03kwSOWx4-D91MVbijmgUjDw@mail.gmail.com>
> Actually writing parsers using the tools like flex & bison is VERY old > school thing to do, as it's a 50 year old technology. Indeed. The only reason for flex/bison to still exist is inertia. In the 1960s when automated tools for parsing were first developed, memory was very scarce and expensive and there was no virtual memory yet. A table driven parser always has the same program size regardless of the size of the language it parses and it can be written to always have the same memory footprint regardless of the size of the input text. This is so because the state is kept in tables that could be written out to tape and read back for another pass. The underlying method is slow and cumbersome and painful to debug, furthermore, error reporting is problematic. By contrast, RD parsing is fast, straightforward, easy to implement and debug, and error reporting is precise. However, the program size grows with the size of the language and memory footprint grows with the size of input text because state is kept on the stack. Back then the hardware simply wasn't up to it for anything but small languages like Pascal and thus table driven parsers were the only feasible choice for most languages. Of course in this day and age, memory is no longer scarce and therefore RD parsing has made a comeback. > Nowadays I always opt for using ANTLR as it makes > the task much easier. That sentiment is why I proposed a presentation that would introduce the concept of recursive descent and then show how to do it both manually and then using ANTLR, further what other benefits ANTLR has such as the ability to visualise a grammar on the fly and find and visualise conflicts, single step through parsed input etc etc.
- References:
- Re: [tlug] presentation wish list
- From: Benjamin Kowarsch
- Re: [tlug] presentation wish list
- From: Travis Cardwell
- Re: [tlug] presentation wish list
- From: Benjamin Kowarsch
- Re: [tlug] presentation wish list
- From: Noda Yoshikazu
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] [meta] focus, projects, series
- Next by Date: Re: [tlug] presentation wish list
- Previous by thread: Re: [tlug] presentation wish list
- Next by thread: Re: [tlug] presentation wish list
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links