Related articles |
---|
coding conventions a7244270@yahoo.com (2003-02-05) |
Re: coding conventions alexc@world.std.com (2003-02-11) |
Re: coding conventions a7244270@yahoo.com (2003-02-21) |
Re: coding conventions s.bosscher@student.tudelft.nl (2003-02-24) |
From: | alexc@world.std.com (Alex Colvin) |
Newsgroups: | comp.compilers |
Date: | 11 Feb 2003 02:14:05 -0500 |
Organization: | The World Public Access UNIX, Brookline, MA |
References: | 03-02-009 |
Keywords: | yacc, practice |
Posted-Date: | 11 Feb 2003 02:14:05 EST |
>I'm fairly new to this flex/bison stuff, and I was wondering - is
>there a recommended coding convention for flex/bison ? like for
>example should I have named the "subpart" differently, etc.
>procedure_decl:
> L200_GLOBAL procedure_decl_subpart
> | L200_EXTERNAL procedure_decl_subpart
> ;
>procedure_decl_subpart:
> L200_PROCEDURE L200_IDENTIFIER L200_SEMICOLON
> ;
I don't have any formal style guide, but I'll push the convention that the
yacc actions should be kept as short as possible, either an assignment or
a function call. Not only does long precedural code make the grammar hard
to follow, but you don't want to put anything you might need to debug in
your *.y file.
What's with the L200_...?
--
mac the naïf
Return to the
comp.compilers page.
Search the
comp.compilers archives again.