Path: csiph.com!xmission!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Christopher F Clark Newsgroups: comp.compilers Subject: RE: Supporting mulitple input syntaxes Date: Fri, 14 Aug 2020 12:44:31 +0300 Organization: Compilers Central Lines: 13 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-08-008@comp.compilers> References: <20-08-002@comp.compilers> <20-08-005@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="456"; mail-complaints-to="abuse@iecc.com" Keywords: C, parse Posted-Date: 15 Aug 2020 10:46:26 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:2560 We did something similar with Yacc++. We used inheritance of grammars (a feature of our product) to do so. In fact, the point of the exercise was to demonstrate that feature. I would presume something similar would work in a hand-written recursive descent parser. -- ****************************************************************************** Chris Clark email: christopher.f.clark@compiler-resources.com Compiler Resources, Inc. Web Site: http://world.std.com/~compres 23 Bailey Rd voice: (508) 435-5016 Berlin, MA 01503 USA twitter: @intel_chris ------------------------------------------------------------------------------