Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.compilers > #2698
| Path | csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end |
|---|---|
| From | luser droog <luser.droog@gmail.com> |
| Newsgroups | comp.compilers |
| Subject | Re: Is it the job of a parser to validate the input data? |
| Date | Fri, 3 Sep 2021 21:37:53 -0700 (PDT) |
| Organization | Compilers Central |
| Lines | 17 |
| Sender | news@iecc.com |
| Approved | comp.compilers@iecc.com |
| Message-ID | <21-09-001@comp.compilers> (permalink) |
| References | <21-08-011@comp.compilers> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Injection-Info | gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="90378"; mail-complaints-to="abuse@iecc.com" |
| Keywords | parse, semantics |
| Posted-Date | 04 Sep 2021 16:54:43 EDT |
| X-submission-address | compilers@iecc.com |
| X-moderator-address | compilers-request@iecc.com |
| X-FAQ-and-archives | http://compilers.iecc.com |
| In-Reply-To | <21-08-011@comp.compilers> |
| Xref | csiph.com comp.compilers:2698 |
Show key headers only | View raw
On Thursday, August 12, 2021 at 10:52:15 AM UTC-5, Christopher F Clark wrote: > It is almost always done in the AST creation routines, not only do you > as our insightful moderator mentioned generally get better error > messages that way, but curiously, the features of extract a number, > turn it into a count, and apply that count (and yes those might be 3 > distinct operations) to be how many items a list involves has not been > implemented in any parser generator or lexer generator that I have > ever seen. That's a bizarre omission, particularly since it is a > common feature in many languages like networking protocols. Doing > fixed counts isn't rare, but doing a count held in a "register" or > "variable" seems to not be done. > I think the omission comes from difficulty in the formalization. Having to apply such a dynamic count moves the parser from context-free to context-sensitive, jumping to a new level in the Chomsky hierarchy. So all the training wheels come off and it all gets scary.
Back to comp.compilers | Previous | Next — Previous in thread | Find similar
Is it the job of a parser to validate the input data? Christopher F Clark <christopher.f.clark@compiler-resources.com> - 2021-08-12 15:10 +0300 Re: Is it the job of a parser to validate the input data? luser droog <luser.droog@gmail.com> - 2021-09-03 21:37 -0700
csiph-web