Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED!nerds-end From: glen herrmannsfeldt Newsgroups: comp.compilers Subject: Re: syntax checkers, was Formatting of Language LRMs Date: Fri, 4 Jul 2014 17:35:34 +0000 (UTC) Organization: Aioe.org NNTP Server Lines: 32 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-07-012@comp.compilers> References: <14-06-010@comp.compilers> <14-06-016@comp.compilers> <14-06-021@comp.compilers> <14-07-004@comp.compilers> <14-07-009@comp.compilers> NNTP-Posting-Host: news.iecc.com X-Trace: miucha.iecc.com 1404496839 5342 2001:470:1f07:1126:0:676f:7373:6970 (4 Jul 2014 18:00:39 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Fri, 4 Jul 2014 18:00:39 +0000 (UTC) Keywords: parse, syntax, comment Posted-Date: 04 Jul 2014 14:00:39 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:1302 Ivan Godard wrote: (snip) > If the document were a compiler written in Java (i.e. a recognizer and > checker) then formally there is no difference. Practically, an immense > difference. VWG is an ASL for specifying languages. All of Algol68 in > VWG was about four pages of appendix; a compiler for Algol68 written in > Java would be much more than that, even after you strip out optimization > and code generation. There are programs written for OS/360 called "syntax checkers". They are not compilers, but only enough of one to tell whether the input is valid syntax in the specific language. I never used the actual program, but the PLM (Program Logic Manual) has the (I believe) BNF form for the language, unlike the normal compiler manuals. As far as I know, they were not normally used in batch systems, but were for use by TSO. Seems to me it should be possible to write a program that will take BNF input, and a program that is supposed to be written in that language, and will tell you whether or not it is. -- glen [That's basically what yacc and other parser generators do, they compile BNF or something similar into a program that recognizes input in the BNF. Of course, for syntax checking you also have to tokenize the input which is another whole can of worms. -John]