Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!world!iecc!compilers-sender From: shankar@india.hp.com (Shankar Unni) Newsgroups: comp.compilers Subject: Parsers for run-time modifiable grammars Keywords: parse Message-ID: <771.673253499@cauvery.india.hp.com> Date: 3 May 91 06:51:39 GMT Sender: compilers-sender@iecc.cambridge.ma.us Reply-To: Shankar Unni Organization: HP India Software Op., Bangalore Lines: 36 Approved: compilers@iecc.cambridge.ma.us Recently, in this newsgroup, I saw a request from someone about run-time modifiable grammars. I am aware of the two papers published in May and November 1990 respectively in the ACM SIGPLAN Notices, but they deal with a restricted aspect of the matter. I am looking for a general-purpose parser or parser-generator tool that can handle languages that allow the programmer to modify his input syntax on the fly. The specific language I am looking at is "ASN.1" (CCITT standard X.208), which has an interesting "MACRO" facility which actually allows the user to embed productions in EBNF notation in the macro definition. Subsequently, when the macro name is recognized, its arguments are parsed using the specified productions in the macro definition - which means that the end of the argument list probably cannot be recognized unless the macro instance is parsed with the augmented grammar. This is also a somewhat specific use of run-time modifiable grammars (the "augmented" grammar is in scope only while parsing the macro instance), but needs a *much* more powerful mechanism than those described in the SIGPLAN papers last year. If folks could mail me any references on this topic, I am willing to summarize and post a followup to this newsgroup. I would also appreciate full reference information (title, authors, etc) of the two ACM SIGPLAN papers, as I can't lay my hands on the issues at the moment... ----- Shankar Unni E-Mail: HP India Software Operation, Bangalore Internet: shankar@india.hp.com Phone : +91-812-261254 x417 UUCP: ...!hplabs!hpda!shankar [Irons' IMP72 allowed you to add BNF to the grammar on the fly. It used Earley's algorithm, the only bottom up parser I know that can handle ambiguous grammars and that doesn't require rebuilding the whole parser when you add productions. -John] -- Send compilers articles to compilers@iecc.cambridge.ma.us or {ima | spdcc | world}!iecc!compilers. Meta-mail to compilers-request.