An inclusive name for complete units of code?
Steven T. Hatton
hattons at globalsymmetry.com
Thu Aug 25 16:50:45 UTC 2005
Is there a formal name used to denote every syntactically complete part of a
program? I'm trying to describe something I'm calling a
"translation-subunit". What I mean by that is a grouping of code that any
reasonably sane person would make the complete contents of a source file.
IOW, I'm not talking about something along the lines of
//------------------------
//start.h
namespace fubar {
//fubar definitions
// END OF FILE
//-----------------------
//end.h
//assume fubar bracket is still open
//more fubar definitions
} // end of fubar namespace
// END OF FILE
//------------------------
//fubar.h
#include "start.h"
#include "end.h"
// END OF FILE
But I am talking about:
//------------------------
//subunit.h
namespace unit {
//unit definitions
} // end of fubar namespace
// END OF FILE
When I tried to express what I meant by this notion of a translation-subunit,
I found myself lacking a word to use to denote what should go in it. I'm
trying to abstract the concept of a (typical) source file or header file
which and talk about it in terms of how its content fits into the syntactic
unit called a translation unit.
As for the word I'm looking for, I'm /mostly/ thinking in terms of stuff
enclosed in bracketing constructs such as parentheses, curly braces, square
brackets, angle brackets, etc. and usually preceeded by a declarator id. (If
I'm using that term correctly.) I'm pretty sure the general idea would be
synonymous with the set of all nodes in the parse tree of a grammatically
correct program.
--
Regards,
Steven
More information about the KDevelop-devel
mailing list