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


Groups > comp.programming > #6955

Re: Parsing and reporting errors?

From "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Newsgroups comp.programming
Subject Re: Parsing and reporting errors?
Date 2016-09-30 22:07 +0200
Organization Aioe.org NNTP Server
Message-ID <nsmgmk$kd0$1@gioia.aioe.org> (permalink)
References <reporting-20160930143708@ram.dialup.fu-berlin.de> <nslvlu$1md1$1@gioia.aioe.org> <20160930085057.781@kylheku.com> <nsm4rc$pi$1@gioia.aioe.org> <20160930104315.851@kylheku.com>

Show all headers | View raw


On 2016-09-30 19:46, Kaz Kylheku wrote:
> On 2016-09-30, Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:

>> Not really, normally the parser simply matches the source against the
>> current table of alternatives expected:
>>     switch (Statements.Match (Source))
>>     {
>
> "the source" constitutes lookahead: the matcher has to peek into the
> stream a number of characters, which stay there if there is no match.

In the sense that a source character might be tested several times. But 
the current line is read into memory anyway.

If the table uses hash that could be counted as a look-ahead too. But 
usually look-ahead means something more substantial.

Tiny brainless parsing stages make messages generation more difficult. 
The richer the context the better messages.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Parsing and reporting errors? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2016-09-30 17:17 +0200
  Re: Parsing and reporting errors? Kaz Kylheku <221-501-9011@kylheku.com> - 2016-09-30 16:03 +0000
    Re: Parsing and reporting errors? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2016-09-30 18:45 +0200
      Re: Parsing and reporting errors? Kaz Kylheku <221-501-9011@kylheku.com> - 2016-09-30 17:46 +0000
        Re: Parsing and reporting errors? "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> - 2016-09-30 22:07 +0200
          Re: Parsing and reporting errors? Kaz Kylheku <221-501-9011@kylheku.com> - 2016-09-30 22:50 +0000

csiph-web