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


Groups > comp.lang.postscript > #1496

Re: xpost3 current challenges: incorporating scanner reveals bug of omission

Newsgroups comp.lang.postscript
Date 2013-07-22 03:50 -0700
References (2 earlier) <40990a96-ef56-4054-8855-269f83f8ca4b@googlegroups.com> <960fa134-40f2-4bc4-b39b-1c3bdf522cc3@googlegroups.com> <b83129fa-66dd-4ddb-8ae6-47d47113db0b@googlegroups.com> <e30f02dd-b40d-4e20-8c23-0d0bcc20e1fa@googlegroups.com> <3632ac17-014f-46af-862d-b609accdcc9e@googlegroups.com>
Message-ID <2efe6933-425a-4cfe-9fbb-e73868f406fb@googlegroups.com> (permalink)
Subject Re: xpost3 current challenges: incorporating scanner reveals bug of omission
From luser- -droog <mijoryx@yahoo.com>

Show all headers | View raw


On Monday, July 22, 2013 5:33:10 AM UTC-5, luser- -droog wrote:
> On Monday, June 24, 2013 2:48:49 AM UTC-5, luser- -droog wrote:
> 
> > I hacked my string scanner into the eval-loop, and discovered a bug that xpost2 almost certainly has too.
> 
> Nope. xpost2 had already faced that one. forgot to check. :)
> 
> The current challenge is finishing-up a new translation of the scanner,
> this time back to C.
> 
> The issue is building procedures. This is where the scanner calls
> itself recursively, becoming a "parser" in so doing (where everywhere
> else it may be treated as a deterministic automaton).
> 
> 

There we go. That wasn't so bad once I started typing. :)

    case '{': { // This is the one part that makes it a recursive-descent parser
                  object tail;
                  tail = consname(ctx, "}");
                  push(ctx->lo, ctx->os, mark);
                  while (1) {
                      object t = toke(ctx, src, next, back);
                      if (objcmp(ctx, t, tail) == 0)
                          break;
                      push(ctx->lo, ctx->os, t); 
                  }
                  arrtomark(ctx);  // ie. the /] operator
                  return cvx(pop(ctx->lo, ctx->os));
              }

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


Thread

xpost3 current challenges luser- -droog <mijoryx@yahoo.com> - 2013-05-04 21:59 -0700
  Re: xpost3 current challenges luser- -droog <mijoryx@yahoo.com> - 2013-05-05 21:39 -0700
    Re: xpost3 current challenges luser- -droog <mijoryx@yahoo.com> - 2013-05-10 22:53 -0700
      Re: xpost3 current challenges luser- -droog <mijoryx@yahoo.com> - 2013-05-12 21:49 -0700
        Re: xpost3 current challenges: a hickup luser- -droog <mijoryx@yahoo.com> - 2013-06-08 22:38 -0700
          Re: xpost3 current challenges: incorporating scanner reveals bug of omission luser- -droog <mijoryx@yahoo.com> - 2013-06-24 00:48 -0700
            Re: xpost3 current challenges: incorporating scanner reveals bug of omission luser- -droog <mijoryx@yahoo.com> - 2013-07-22 03:33 -0700
              Re: xpost3 current challenges: incorporating scanner reveals bug of omission luser- -droog <mijoryx@yahoo.com> - 2013-07-22 03:50 -0700
          Re: xpost3 current challenges: a hickup luser- -droog <mijoryx@yahoo.com> - 2013-08-17 11:34 -0700
  Re: xpost3 current challenges luser- -droog <mijoryx@yahoo.com> - 2013-07-23 01:02 -0700

csiph-web