From 9d85df0ee463512a1733fc8c7dd7514f2ec79c8c Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Sat, 9 Dec 2006 11:21:04 -0600 Subject: [PATCH] Add copyright to idlcomp files that were previously just "Written by:". --- idlcomp/cdl.h | 23 +++++ idlcomp/cdlparse.y | 25 +++++- idlcomp/idlparse.y | 25 +++++- idlcomp/input.cc | 25 +++++- idlcomp/lang.h | 5 +- idlcomp/main.cc | 199 +++++++++++++++++++++++-------------------- idlcomp/namespace.cc | 25 +++++- idlcomp/output.cc | 25 +++++- idlcomp/scan.lex | 25 +++++- idlcomp/targets.h | 5 +- idlcomp/types.cc | 25 +++++- 11 files changed, 280 insertions(+), 127 deletions(-) diff --git a/idlcomp/cdl.h b/idlcomp/cdl.h index d46b2a6..043991a 100644 --- a/idlcomp/cdl.h +++ b/idlcomp/cdl.h @@ -1,3 +1,26 @@ +// Types which are only used when compiling CDL files +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. + + #ifndef CDL_H #define CDL_H diff --git a/idlcomp/cdlparse.y b/idlcomp/cdlparse.y index 8896bbb..59185fb 100644 --- a/idlcomp/cdlparse.y +++ b/idlcomp/cdlparse.y @@ -1,8 +1,25 @@ %{ -/* cdlparse.y -- parser for the CDL compiler - * - * Written by Scott Wood - */ +// CDL parser +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/idlparse.y b/idlcomp/idlparse.y index 75c6a89..e02f145 100644 --- a/idlcomp/idlparse.y +++ b/idlcomp/idlparse.y @@ -1,8 +1,25 @@ %{ -/* idlparse.y -- parser for the IDL compiler - * - * Written by Scott Wood - */ +// IDL parser +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/input.cc b/idlcomp/input.cc index f772419..c2fe81a 100644 --- a/idlcomp/input.cc +++ b/idlcomp/input.cc @@ -1,7 +1,24 @@ -/* input.cc -- Code to load symbols from a legacy filesystem - * - * Written by Scott Wood - */ +// Code to load symbols from a legacy filesystem +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/lang.h b/idlcomp/lang.h index 52767ca..b6b9082 100644 --- a/idlcomp/lang.h +++ b/idlcomp/lang.h @@ -1,7 +1,4 @@ -/* lang.h -- Definitions used with language bindings - * - * Written by Scott Wood - */ +// Definitions used with language bindings #ifndef IDLC_LANG_H #define IDLC_LANG_H diff --git a/idlcomp/main.cc b/idlcomp/main.cc index 597fbb7..8abda4e 100644 --- a/idlcomp/main.cc +++ b/idlcomp/main.cc @@ -1,94 +1,111 @@ -/* main.cc -- entry point for the interface compiler - * - * Written by Scott Wood - * - * The idlc program implements two main functions. One is to turn - * .idl files into binary type descriptions. The other is to turn - * those type descriptions into language-specific stubs (though a - * compiler/interpreter could also just read the binary types - * directly, as the ORB does). - * - * For the former function, it is necessary to do the work in multiple - * passes, as not all information is available the first time through due - * to the absence of forward declarations. The passes are as follows: - * - * 1: Parse the input text, and determine which symbols exist in - * which namespaces. At this point, no non-namespace-qualified - * symbol lookups will be done (though namespace-qualified lookups - * are done, such as to check for duplicate symbols). - * - * Objects will be created for each entity (Interface, Struct, - * Datum, Alias, etc.), but any reference to another entity will be - * stored as a StrList, not as an object pointer. This must be the - * case even if a lookup during this pass would have found - * something, as on the second pass it might find a "closer" - * matching symbol added later. - * - * The StrList will later be looked up with only the entity - * containing the reference as context, so namespace search rules - * must not depend on anything else. - * - * This is the only pass that involves actually reading and - * parsing the input file(s). - * - * 2: Look up the namespace names of using namespace.* statements. - * These are the only lookups where order of the statements in the - * file matters, and it alters the result of a lookup, so it must be - * completed before chain lookups are done. - * - * 3: Look up the symbol names recorded in pass 1 for aliases, and - * typedefs, and const datum initializers and types. This is done - * before the rest of the lookups, so there will always be a - * complete chain to follow in subsequent passes. - * - * This is done by calling the virtual lookup_chain() method on - * the root namespace, which recursively calls it on all of its - * contents. - * - * 4: Look up other symbol names recorded in pass 1. At this point, - * unresolved alias chains may still exist and must be handled, - * though they should be fixed during this phase so that they do not - * appear in phase 4. Typedefs will remain fully chained, as the - * chain is semantically meaningful and must be preserved in the - * output. - * - * Const datum initializers are looked up in this pass despite being - * chains, since aliases aren't resolved in pass 2, and it's - * (slightly) easier to do the lookup in pass 3 and resolve the - * chain in pass 4 than to store a Symbol reference in pass 2, - * get the concerete sym in pass 3, and still have to either - * concrete-ize other Datums' initializers or wait until pass 4 - * to resolve the chain. - * - * This is done by calling the virtual lookup_misc() method on the - * root namespace, which recursively calls it on all of its - * contents. Upon receiving this call, each entity object should - * call lookup_sym() or lookup_type() on the various StrLists it has - * stored, but should not do anything with the object pointer - * until pass 4 (unless the object was satisfactorily initialized - * in pass 1). - * - * 5: Perform any remaining semantic analysis, now that all references - * to other entities have been looked up. - * - * This is done by calling the virtual final_analysis() method on - * the root namespace, which recursively calls it on all of its - * contents. - * - * 6: Generate output. - * This is done by calling the virtual output() method on - * the root namespace, which recursively calls it on all of its - * contents. - * - * All circular dependencies must be contained within the set of files - * passed to the compiler in one invocation. Supporting circular - * dependencies over multiple invocations of the compiler would require - * explicitly running only certain passes, then compiling the other - * batch, and then finishing the original batch. It could be done with - * some pain (intermediate states would need to be serialized), but I - * only want to do it if there's a real need. Circular dependencies - * ought to be isolated fairly locally... - */ +// Entry point for the interface compiler +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. +// +// The idlc program implements two main functions. One is to turn +// .idl files into binary type descriptions. The other is to turn +// those type descriptions into language-specific stubs (though a +// compiler/interpreter could also just read the binary types +// directly, as the ORB does). +// +// For the former function, it is necessary to do the work in multiple +// passes, as not all information is available the first time through due +// to the absence of forward declarations. The passes are as follows: +// +// 1: Parse the input text, and determine which symbols exist in +// which namespaces. At this point, no non-namespace-qualified +// symbol lookups will be done (though namespace-qualified lookups +// are done, such as to check for duplicate symbols). +// +// Objects will be created for each entity (Interface, Struct, +// Datum, Alias, etc.), but any reference to another entity will be +// stored as a StrList, not as an object pointer. This must be the +// case even if a lookup during this pass would have found +// something, as on the second pass it might find a "closer" +// matching symbol added later. +// +// The StrList will later be looked up with only the entity +// containing the reference as context, so namespace search rules +// must not depend on anything else. +// +// This is the only pass that involves actually reading and +// parsing the input file(s). +// +// 2: Look up the namespace names of using namespace.* statements. +// These are the only lookups where order of the statements in the +// file matters, and it alters the result of a lookup, so it must be +// completed before chain lookups are done. +// +// 3: Look up the symbol names recorded in pass 1 for aliases, and +// typedefs, and const datum initializers and types. This is done +// before the rest of the lookups, so there will always be a +// complete chain to follow in subsequent passes. +// +// This is done by calling the virtual lookup_chain() method on +// the root namespace, which recursively calls it on all of its +// contents. +// +// 4: Look up other symbol names recorded in pass 1. At this point, +// unresolved alias chains may still exist and must be handled, +// though they should be fixed during this phase so that they do not +// appear in phase 4. Typedefs will remain fully chained, as the +// chain is semantically meaningful and must be preserved in the +// output. +// +// Const datum initializers are looked up in this pass despite being +// chains, since aliases aren't resolved in pass 2, and it's +// (slightly) easier to do the lookup in pass 3 and resolve the +// chain in pass 4 than to store a Symbol reference in pass 2, +// get the concerete sym in pass 3, and still have to either +// concrete-ize other Datums' initializers or wait until pass 4 +// to resolve the chain. +// +// This is done by calling the virtual lookup_misc() method on the +// root namespace, which recursively calls it on all of its +// contents. Upon receiving this call, each entity object should +// call lookup_sym() or lookup_type() on the various StrLists it has +// stored, but should not do anything with the object pointer +// until pass 4 (unless the object was satisfactorily initialized +// in pass 1). +// +// 5: Perform any remaining semantic analysis, now that all references +// to other entities have been looked up. +// +// This is done by calling the virtual final_analysis() method on +// the root namespace, which recursively calls it on all of its +// contents. +// +// 6: Generate output. +// This is done by calling the virtual output() method on +// the root namespace, which recursively calls it on all of its +// contents. +// +// All circular dependencies must be contained within the set of files +// passed to the compiler in one invocation. Supporting circular +// dependencies over multiple invocations of the compiler would require +// explicitly running only certain passes, then compiling the other +// batch, and then finishing the original batch. It could be done with +// some pain (intermediate states would need to be serialized), but I +// only want to do it if there's a real need. Circular dependencies +// ought to be isolated fairly locally... #include #include diff --git a/idlcomp/namespace.cc b/idlcomp/namespace.cc index 8929f82..ad5f543 100644 --- a/idlcomp/namespace.cc +++ b/idlcomp/namespace.cc @@ -1,7 +1,24 @@ -/* namespace.cc -- Code to maintain and search namespaces - * - * Written by Scott Wood - */ +// Code to maintain and search namespaces +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/output.cc b/idlcomp/output.cc index ae1ecbf..e2fe164 100644 --- a/idlcomp/output.cc +++ b/idlcomp/output.cc @@ -1,7 +1,24 @@ -/* output.cc -- Code to output symbols to a legacy filesystem - * - * Written by Scott Wood - */ +// Code to output symbols to a legacy filesystem +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/scan.lex b/idlcomp/scan.lex index 1ea52dd..68c8170 100644 --- a/idlcomp/scan.lex +++ b/idlcomp/scan.lex @@ -1,8 +1,25 @@ %{ -/* scan.lex -- scanner for the IDL compiler - * - * Written by Scott Wood - */ +// IDL/CDL scanner +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include diff --git a/idlcomp/targets.h b/idlcomp/targets.h index abc93c3..93ffd09 100644 --- a/idlcomp/targets.h +++ b/idlcomp/targets.h @@ -1,7 +1,4 @@ -/* targets.h -- target architecture definitions - * - * Written by Scott Wood - */ +// Target architecture definitions #ifndef IDLC_TARGETS_H #define IDLC_TARGETS_H diff --git a/idlcomp/types.cc b/idlcomp/types.cc index 75597f2..5963750 100644 --- a/idlcomp/types.cc +++ b/idlcomp/types.cc @@ -1,7 +1,24 @@ -/* types.cc -- Semantic actions for types and namespaces. - * - * Written by Scott Wood - */ +// Semantic actions for types and namespaces +// +// This software is copyright (c) 2006 Scott Wood . +// +// Permission is hereby granted, free of charge, to any person obtaining a copy of +// this software and associated documentation files (the "Software"), to deal with +// the Software without restriction, including without limitation the rights to +// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +// of the Software, and to permit persons to whom the Software is furnished to do +// so, subject to the following condition: +// +// The above copyright notice and this permission notice shall be +// included in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +// SOFTWARE. #include #include -- 2.39.2