From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,df854b5838c3e14 X-Google-Attributes: gid109fba,public X-Google-Thread: 1014db,df854b5838c3e14 X-Google-Attributes: gid1014db,public X-Google-Thread: 103376,948c42d74a60770e X-Google-Attributes: gid103376,public From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) Subject: Re: C/C++ knocks the crap out of Ada Date: 1996/03/15 Message-ID: <4idk8oINNrr2@keats.ugrad.cs.ubc.ca>#1/1 X-Deja-AN: 142995410 references: <00001a73+00002504@msn.com> organization: Computer Science, University of B.C., Vancouver, B.C., Canada newsgroups: comp.lang.ada,comp.lang.c,comp.lang.c++ Date: 1996-03-15T00:00:00+00:00 List-Id: In article <4idh80$6tj@solutions.solon.com>, Peter Seebach wrote: >In article <4icja9$1r92@saba.info.ucla.edu>, >Jay Martin wrote: >>>Lex and Yacc are proven utilities that work. > >>Lex and Yacc are braindead crap along with C and Unix. Do they have an >>option to output Ada?? > >Huh? I'm sorry, but you have *no* argument here. Lex and Yacc are brilliant; >they do *exactly* what they're supposed to do. What problems do you see >with them? (Reply by email, please, this is even less topical than usual.) > >Sure they have an option to output Ada. It's the one you're about to write, >if it's so useful. I have no need for it, so I'm not about to. It could >be done, of course - it's just not currently needed. :) > >>You have become and "idiot savant" at it, congratulations, >>unfortunately the next guy might not reading your code. I wasn't >>talking about needing a grammer, I was talking with about reading in a >>simple table. Its stupid to bring in two tools with two more >>"languages" to do something trivial that takes a page of normal code. > >Very few people would bring in yacc for just reading a table. I personally >would. My table parser would also support simple expression grammars. Could >you do that in a page of normal code, too? (Of course you could; you'd >use perl, and call eval.) I do too. I recently wrote a configuration file parser for a daemon I was hired to develop. Right now, it has a brain-dead syntax. However, it is robust with respect to comments and whitespace and deals with ".." strings, integer constants and identifiers properly. I used error productions in the yacc grammar to generate useful, friendly error messages that pinpoint a problem. I anticipate that the grammar will get more complicated when I add certain features; the parser/scanner will be a snap to update, compared to having to understand my own code. :) I didn't want to waste time writing this thing. I wanted a configuration file facility, NOW! Lex and yacc gave it to me, in minutes. And hey, regular expressiona and grammars _are_ more fun than switch() statements with numeric case labels... so punish me for enjoying the ``journey'' for its own sake! I'm glad I like my work! >Like all tools, lex and yacc are excellent for some tasks, and useless >for others. I can only assume you've been trying to use them for >inappropriate tasks, or more likely, that you haven't ever used them, >and that you're not familiar with C, either. You've posted many >claims, with *no* documentation, *no* examples, and *no* rationale. That trick allows an author to retreat infinitely without admitting he is wrong, because there is no wall to back into. ``But I never said this or that...''. Of course not. Didn't say a damn thing, in fact. Without the documentation, examples and whatnot, it is just *.advocacy fluff. >Most Ada advocates at least have points to make; you, sir, are a discredit >to Ada users. Hmph. "rabid language fanatics" indeed. On the contrary, I don't think he discredits anyone but himself. I'd hate to think that someone would consider some random C/UNIX fanatic to be a discredit to _me_. (Unless I _am_ that fanatic, of course :). --