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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 108717,ea99940253996e3e X-Google-Attributes: gid108717,public X-Google-Thread: f43e6,ea99940253996e3e X-Google-Attributes: gidf43e6,public X-Google-Thread: 109fba,ea99940253996e3e X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,ea99940253996e3e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-08 09:30:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!in.100proofnews.com!in.100proofnews.com!snoopy.risq.qc.ca!msc1.onvoy!onvoy.com!news.mmm.com!not-for-mail From: Programmer Dude Newsgroups: comp.software-eng,comp.programming,comp.lang.c++,comp.lang.ada Subject: Re: ISO Studies of underscores vs MixedCase in Ada or C++ Date: Wed, 08 Oct 2003 11:22:25 -0500 Organization: Wrenn Productions, Ltd Message-ID: <3F8439C1.F39C8DC0@Sonnack.com> References: <2cfd1a4e.0309252032.3e3c0a1a@posting.google.com> <3F7C37C3.B5469C33@Sonnack.com> NNTP-Posting-Host: 169.10.179.242 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.7 [en] (WinNT; I) X-Accept-Language: en Xref: archiver1.google.com comp.software-eng:90 comp.programming:575 comp.lang.c++:1483 comp.lang.ada:474 Date: 2003-10-08T11:22:25-05:00 List-Id: Peter Ammon wrote: >> classmethod : >> access_specifier >> method_type_specifier >> method_return_type_specifier >> method_declaration >> method_body > > You've piqued my interest, since I'm the first to admit that my > grammar specifications are hard to read. > > Where do you put the action in the above code? > > classmethod : > access_specifier > method_type_specifier > method_return_type_specifier > method_declaration > method_body > { doSomething(); } I thought this was a grammar definition? I'd have thought that method_body :== { doSomething(); } But if they are different, the way you did it seems fine to me. > What if there's more than one reduction possible? > > classmethod : > access_specifier > method_type_specifier > method_return_type_specifier > method_declaration > method_body > { doSomething(); } > | something_else > another_thing > even_more > blah_blah > { doSomethingElse(); } Probably break them up in some fashion: class-method: class-method-normal | class-method-extended class-method-normal: access-specifier method-type-specifier method-return-type-specifier method-declaration method-body class-method-extended: something-else another-thing even-more blah-blah >> (In proportional fonts, hyphens are usually skinnier than >> underscores and (to my eye) make the text more readable. >> It's not as noticable with monospace fonts, but I think the >> lower example looks better (read: more readable :-).) > > Agreed! I wish that more languages allowed hyphen use in > identifiers. Dylan is the only one I can think of off the > top of my head. Others have already mentioned Lisp, so I don't have to! (Well,... *didn't* have to... :-) -- |_ CJSonnack _____________| How's my programming? | |_ http://www.Sonnack.com/ ___________________| Call: 1-800-DEV-NULL | |_____________________________________________|_______________________|