Major cleanup of comments

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@128 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-01-20 05:45:58 +00:00
commit fc2fb1ff98
25 changed files with 769 additions and 853 deletions

View file

@ -1,24 +1,16 @@
/*******************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
/* -----------------------------------------------------------------------------
* cscanner.c
*
* C Scanner that is roughly compatible with the SWIG1.1 scanner.
*
* Author : David Beazley
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* beazley@cs.uchicago.edu
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
*******************************************************************************/
/* -----------------------------------------------------------------------------
* $Header$
*
* scanner.c
* Copyright (C) 1999-2000. The University of Chicago
* See the file LICENSE for information on usage and redistribution.
* ----------------------------------------------------------------------------- */
static char cvsroot[] = "$Header$";
#include "lparse.h"
#define yylval lparse_yylval

View file

@ -1,17 +1,15 @@
/****************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
/* -----------------------------------------------------------------------------
* lparse.h
*
* Lame tag-based parsed based on the SWIG1.1 parser.
*
* Author : David Beazley
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* beazley@cs.uchicago.edu
* Copyright (C) 1999-2000. The University of Chicago
* See the file LICENSE for information on usage and redistribution.
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
****************************************************************************/
* $Header$
* ----------------------------------------------------------------------------- */
#ifndef _LPARSE_H
#define _LPARSE_H
@ -22,7 +20,6 @@
extern "C" {
#endif
extern void LParse_push(DOH *);
extern DOH *LParse_skip_balanced(int, int);
extern void LParse_skip_semi();

View file

@ -1,25 +1,14 @@
%{
/*******************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
*
* Author : David Beazley
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* beazley@cs.uchicago.edu
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
*******************************************************************************/
/***********************************************************************
* $Header$
*
/* -----------------------------------------------------------------------------
* parser.y
*
* YACC parser for parsing function declarations.
***********************************************************************/
* YACC grammar for Dave's lame parser.
*
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
*
* Copyright (C) 1999-2000. The University of Chicago
* See the file LICENSE for information on usage and redistribution.
* ----------------------------------------------------------------------------- */
#define yylex lparse_yylex
#define yyerror lparse_yyerror
@ -597,7 +586,7 @@ tm_parm : type tm_name {
$$ = NewHash();
if ($2.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($2.array));
$1->arraystr = Swig_copy_string(Char($2.array));
}
Setattr($$,"type",$1);
if ($2.name)
@ -610,7 +599,7 @@ tm_parm : type tm_name {
$1->is_pointer += $2.ivalue;
if ($3.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($3.array));
$1->arraystr = Swig_copy_string(Char($3.array));
}
Setattr($$,"type",$1);
if ($3.name)
@ -624,7 +613,7 @@ tm_parm : type tm_name {
$1->is_pointer++;
if ($3.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($3.array));
$1->arraystr = Swig_copy_string(Char($3.array));
}
Setattr($$,"type",$1);
if ($3.name)
@ -750,7 +739,7 @@ variable_decl : extern_spec type declaration array2 def_args {
$2->is_pointer += $3.is_pointer;
if ($4.text) {
$2->is_pointer++;
$2->arraystr = copy_string(Char($4.text));
$2->arraystr = Swig_copy_string(Char($4.text));
}
$2->is_reference = $3.is_reference;
o = new_node("Variable", Getfile($3.id),Getline($3.id));
@ -860,7 +849,7 @@ stail : SEMI { }
t->is_pointer += $2.is_pointer;
if ($3.text) {
t->is_pointer++;
t->arraystr = copy_string(Char($3.text));
t->arraystr = Swig_copy_string(Char($3.text));
}
t->is_reference = $2.is_reference;
o = new_node("Variable", Getfile($2.id),Getline($2.id));
@ -1021,7 +1010,7 @@ typedef_decl : TYPEDEF type declaration {
Active_typedef = (LParseType *) Copy($2);
$2->is_pointer += $3.is_pointer;
$2->is_pointer++;
$2->arraystr = copy_string(Char($4.text));
$2->arraystr = Swig_copy_string(Char($4.text));
LParse_typedef_add($2,$3.id);
o = new_node("Typedef", $1.filename, $1.line);
Setattr(o,"name", $3.id);
@ -1046,7 +1035,7 @@ typedeflist : COMMA declaration typedeflist {
LParseType *t;
t = (LParseType *) Copy(Active_typedef);
t->is_pointer += $2.is_pointer + 1;
t->arraystr = copy_string(Char($3.text));
t->arraystr = Swig_copy_string(Char($3.text));
LParse_typedef_add(t,$2.id);
o = new_node("Typedef", Getfile($2.id), Getline($2.id));
Setattr(o,"name", $2.id);
@ -1322,7 +1311,7 @@ cpp_member : type declaration LPAREN parms RPAREN cpp_end {
$1->is_pointer += $2.is_pointer;
$1->is_reference = $2.is_reference;
if ($3.text) {
$1->arraystr = copy_string(Char($3.text));
$1->arraystr = Swig_copy_string(Char($3.text));
$1->is_pointer++;
}
Setattr(o,"name",$2.id);
@ -1498,7 +1487,7 @@ cpp_tail : SEMI { }
t->is_pointer += $2.is_pointer;
t->is_reference = $2.is_reference;
if ($3.text) {
t->arraystr = copy_string(Char($3.text));
t->arraystr = Swig_copy_string(Char($3.text));
t->is_pointer++;
}
Setattr(o,"name",$2.id);
@ -1595,7 +1584,7 @@ parm : type pname {
Setattr($$,"name",$2.name);
if ($2.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($2.array));
$1->arraystr = Swig_copy_string(Char($2.array));
}
if ($2.value)
Setattr($$,"value",$2.value);
@ -1607,7 +1596,7 @@ parm : type pname {
$1->is_pointer += $2.ivalue;
if ($3.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($3.array));
$1->arraystr = Swig_copy_string(Char($3.array));
}
if ($3.value) {
Setattr($$,"value",$3.value);
@ -1621,7 +1610,7 @@ parm : type pname {
Setattr($$,"name",$3.name);
if ($3.array) {
$1->is_pointer++;
$1->arraystr = copy_string(Char($3.array));
$1->arraystr = Swig_copy_string(Char($3.array));
}
if ($3.value) {
Setattr($$,"value",$3.value);
@ -1766,7 +1755,7 @@ realtype : TYPE_INT { $$ = NewLParseType(LPARSE_T_INT); }
}
| CONST type {
$$ = $2;
$$->qualifier = copy_string("const");
$$->qualifier = Swig_copy_string("const");
}
| cpptype idtype {
$$ = NewLParseType(LPARSE_T_USER);

View file

@ -1,28 +1,18 @@
/****************************************************************************
* Simplified Wrapper and Interface Generator (SWIG)
/* -----------------------------------------------------------------------------
* type.c
*
* Lame SWIG1.1 type implementation.
*
* Author : David Beazley
* Author(s) : David Beazley (beazley@cs.uchicago.edu)
*
* Department of Computer Science
* University of Chicago
* 1100 E 58th Street
* Chicago, IL 60637
* beazley@cs.uchicago.edu
*
* Please read the file LICENSE for the copyright and terms by which SWIG
* can be used and distributed.
****************************************************************************/
* Copyright (C) 1999-2000. The University of Chicago
* See the file LICENSE for information on usage and redistribution.
* ----------------------------------------------------------------------------- */
static char cvsroot[] = "$Header$";
#include "lparse.h"
/* -----------------------------------------------------------------------------
* $Header$
*
* type.c
*
* Lame type structure for old SWIG parser
* ----------------------------------------------------------------------------- */
extern DOH *LParseTypeStr(DOH *to);
static DohObjInfo LParseTypeType = {