head	39.17;
access;
symbols
	V39_14:39.17
	V39_13:39.16
	V39_12:39.15
	V39_11:39.14
	V39_10:39.12
	c3910:39.13
	V39_9:39.10;
locks; strict;
comment	@** @;


39.17
date	95.09.02.20.47.27;	author StRuppert;	state Exp;
branches;
next	39.16;

39.16
date	95.08.07.15.17.19;	author StRuppert;	state Exp;
branches;
next	39.15;

39.15
date	95.07.25.13.08.00;	author StRuppert;	state Exp;
branches;
next	39.14;

39.14
date	95.07.09.14.40.08;	author StRuppert;	state Exp;
branches;
next	39.13;

39.13
date	95.06.04.18.53.53;	author StRuppert;	state Exp;
branches;
next	39.12;

39.12
date	95.06.04.17.04.11;	author StRuppert;	state Exp;
branches;
next	39.11;

39.11
date	95.06.04.16.55.55;	author StRuppert;	state Exp;
branches;
next	39.10;

39.10
date	95.05.10.14.58.53;	author StRuppert;	state Exp;
branches;
next	;


desc
@initial
@


39.17
log
@*** empty log	message	***
@
text
@
/*  A Bison parser, made from cdt.y with Bison version GNU Bison version 1.22
  */

#define YYBISON 1  /* Identify Bison output.  */

#define yyparse cdtparse_parse
#define yylex cdtparse_lex
#define yyerror cdtparse_error
#define yylval cdtparse_lval
#define yychar cdtparse_char
#define yydebug cdtparse_debug
#define yynerrs cdtparse_nerrs
#define	T_INCLUDE	258
#define	T_DEFINE	259
#define	T_UNDEF	260
#define	T_PRAGMA	261
#define	T_LINE	262
#define	T_ERROR	263
#define	T_IF	264
#define	T_IFDEF	265
#define	T_IFNDEF	266
#define	T_ELIF	267
#define	T_ENDIF	268
#define	T_AUTO	269
#define	T_EXTERN	270
#define	T_REGISTER	271
#define	T_STATIC	272
#define	T_USERSTORAGE	273
#define	T_CHAR	274
#define	T_SHORT	275
#define	T_INT	276
#define	T_LONG	277
#define	T_BOOL	278
#define	T_SIGNED	279
#define	T_UNSIGNED	280
#define	T_FLOAT	281
#define	T_DOUBLE	282
#define	T_VOID	283
#define	T_USERTYPE	284
#define	T_TEMPLATE	285
#define	T_SWITCH	286
#define	T_CASE	287
#define	T_BREAK	288
#define	T_DEFAULT	289
#define	T_ELSE	290
#define	T_FOR	291
#define	T_DO	292
#define	T_WHILE	293
#define	T_CONTINUE	294
#define	T_CONST	295
#define	T_VOLATILE	296
#define	T_GOTO	297
#define	T_RETURN	298
#define	T_USERKEYWORD	299
#define	T_STRUCT	300
#define	T_UNION	301
#define	T_ENUM	302
#define	T_TYPEDEF	303
#define	T_SIZEOF	304
#define	T_CLASS	305
#define	T_PUBLIC	306
#define	T_PRIVATE	307
#define	T_PROTECTED	308
#define	T_VIRTUAL	309
#define	T_FRIEND	310
#define	T_NEW	311
#define	T_DELETE	312
#define	T_OPERATOR	313
#define	T_TRY	314
#define	T_CATCH	315
#define	T_THROW	316
#define	T_INLINE	317
#define	T_ID	318
#define	T_CHR	319
#define	T_NUMBER	320

#line 1 "cdt.y"

/*
** $PROJECT: c.datatype
**
** $VER: cdt.y 39.15 (02.09.95)
**
** by
**
** Stefan Ruppert , Windthorststraße 5 , 65439 Flörsheim , GERMANY
**
** (C) Copyright 1995
** All Rights Reserved !
**
** $HISTORY:
**
** 02.09.95 : 039.015 : added userstorage and fixed some bugs (see history for V39.14)
** 07.08.95 : 039.014 : added userkeyword support, fixed bug in alloca replacement
** 09.07.95 : 039.013 : completely rewitten segment handling, separate c++/c keywords and more
** 04.06.95 : 039.012 : fixed c++ comment bug, which was damaged by the V39.11 changes
** 04.06.95 : 039.011 : handles tabs and spaces correctly, also for printing
** 10.05.95 : 039.010 : added userdefined types
** 28.04.95 : 039.009 : fixed tab calculation after a // comment
** 26.04.95 : 039.008 : fixed bug,a \ at the end of the line within a string wasn't handled correctly
** 22.04.95 : 039.007 : two bugs fixed (// comments and \ after a string)
** 14.04.95 : 039.006 : added nested switch
** 07.04.95 : 039.005 : else keyword wasn't correct sorted
** 24.03.95 : 039.004 : missing else keyword added
** 23.03.95 : 039.003 : now full tabs handling
** 12.03.95 : 039.002 : added C++ keywords
** 07.03.95 : 039.001 : initial
*/

#include "classbase.h"

/*FS*/ void add_line(struct CParse *cparse,struct Style *style,STRPTR text,LONG len)
{
	struct ClassBase *cb = cparse->ClassBase;
	struct Line *line;

	LONG lf = 0;

	if(len > 0 && text[len-1] == '\n')
	{
		lf = LNF_LF;
		len--;
	}

	if((style->Style & FSF_UNDERLINED) && *text == ' ')
	{
		STRPTR ptr = text;

		while(*text == ' ')
			text++;

		len -= (text-ptr);
		style->Style &= ~FSF_UNDERLINED;
		add_line(cparse,style,ptr,(text-ptr));
		style->Style |=  FSF_UNDERLINED;
	}

	if((line = AllocPooled(cparse->Data->cd_Pool,sizeof(struct Line))))
	{
		line->ln_Text     = text;
		line->ln_TextLen  = len;

		line->ln_XOffset  = cparse->XOffset;
		line->ln_YOffset  = cparse->YOffset;
		line->ln_Width    = TextLength(cparse->RPort,line->ln_Text,line->ln_TextLen);
		line->ln_Height   = cparse->RPort->TxHeight;
		line->ln_Flags    = lf;
		line->ln_FgPen    = style->FgPen;
		line->ln_BgPen    = style->BgPen;
		if(style->Style != ~0)
			line->ln_Style = style->Style;
		else
		{
			line->ln_Style = FS_NORMAL;
			line->ln_FgPen = cparse->Data->cd_CStyle[C_STANDARD].FgPen;
		}

		if(lf)
		{
			if(cparse->XOffset + line->ln_Width > cparse->MaxWidth)
				cparse->MaxWidth = cparse->XOffset + line->ln_Width;

			cparse->YOffset += line->ln_Height;
			cparse->XOffset  = 0;
		} else
		{
			cparse->XOffset += line->ln_Width;

#if 0
			D({
				STRPTR ptr = &line->ln_Text[line->ln_TextLen];
				UBYTE help = *ptr;

				*ptr = '\0';
				bug("text : %s\n",line->ln_Text);
				*ptr = help;
			  });
#endif
		}

		AddTail(cparse->LineList,(struct Node *) line);
	}
}
/*FE*/

/*FS*/ void add_cexpr1(struct CParse *cparse,LONG index,STRPTR text,LONG len)
{
	if(cparse->Data->cd_CStyle[index].Style != ~0 || text[len-1] == '\n')
	{
		if(cparse->SegPtr < cparse->TxtPtr)
		{
			UWORD mode = cparse->ModeStack[cparse->ModeSP];

			add_line(cparse,&cparse->Data->cd_CStyle[mode],
						cparse->SegPtr,(cparse->TxtPtr - cparse->SegPtr));
		}

		if(len > 0)
		{
			DB(("style index : %ld , len : %ld\n",index,len));

			add_line(cparse,&cparse->Data->cd_CStyle[index],text,len);
		}

		cparse->TxtPtr = cparse->ActPtr;
		cparse->SegPtr = cparse->ActPtr;
	} else
		cparse->TxtPtr = cparse->ActPtr;
}
/*FE*/

static int cdtparse_lex(int *lvalp,struct CParse *cparse);

#define _STDIO_H

#ifdef printf
#undef printf
#endif

#define printf                bug
#define add_cexpr(index)      add_cexpr1(cparse,index,cparse->TxtPtr,cparse->ActPtr-cparse->TxtPtr)

/* mode macros */
#define push_mode(mode)       cparse->ModeStack[++cparse->ModeSP] = mode
#define replace_mode(mode)    cparse->ModeStack[cparse->ModeSP] = mode
#define pop_mode              cparse->ModeSP--

#define LASTLF                (((struct Line *) cparse->LineList->lh_TailPred)->ln_Flags & LNF_LF)
#define YYPARSE_PARAM         struct CParse *cparse
#define YYLEX_PARAM           cparse

#ifdef yyerror
#undef yyerror
#endif
#define yyerror(x)            cdtparse_parseerror(cparse,x)


#ifndef YYLTYPE
typedef
  struct yyltype
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
  yyltype;

#define YYLTYPE yyltype
#endif

#ifndef YYSTYPE
#define YYSTYPE int
#endif
#include <stdio.h>

#ifndef __cplusplus
#ifndef __STDC__
#ifndef const
#define const
#endif
#endif
#endif



#define	YYFINAL		169
#define	YYFLAG		-32768
#define	YYNTBASE	73

#define YYTRANSLATE(x) ((unsigned)(x) <= 320 ? yytranslate[x] : 109)

static const char yytranslate[] = {     0,
     2,     2,     2,     2,     2,     2,     2,     2,     2,    67,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,    68,    66,     2,     2,     2,    72,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,    69,
     2,    70,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,    71,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63,    64,    65
};

#if YYDEBUG != 0
static const short yyprhs[] = {     0,
     0,     2,     4,     7,     8,    12,    14,    16,    18,    20,
    22,    24,    25,    29,    30,    31,    37,    39,    41,    43,
    45,    47,    49,    51,    53,    55,    57,    61,    65,    67,
    69,    72,    74,    76,    78,    79,    81,    83,    86,    88,
    90,    92,    93,    98,   102,   104,   106,   108,   109,   114,
   116,   118,   120,   122,   124,   126,   128,   130,   132,   134,
   136,   138,   140,   142,   144,   146,   148,   150,   152,   154,
   156,   158,   160,   162,   164,   166,   168,   170,   172,   174,
   176,   178,   180,   181,   185,   186,   190,   192,   194,   196,
   197,   199,   201,   203,   205,   207,   209,   211,   213,   215,
   217,   219,   221,   223,   225,   227,   229,   231,   233,   236,
   238,   240,   242,   244,   246,   250,   251,   252,   259,   260,
   262,   264,   266,   268,   270,   273,   274,   277,   279,   282,
   283,   285,   287,   289,   291,   293,   295,   297,   300,   302,
   304,   306,   308,   310,   312,   314,   316
};

static const short yyrhs[] = {    74,
     0,    75,     0,    74,    75,     0,     0,    66,    76,    77,
     0,    67,     0,    98,     0,    99,     0,    90,     0,   100,
     0,    81,     0,     0,     3,    78,    82,     0,     0,     0,
     4,    79,    63,    80,    85,     0,     5,     0,     6,     0,
     7,     0,     8,     0,     9,     0,    10,     0,    11,     0,
    12,     0,    13,     0,    35,     0,    68,    83,    68,     0,
    69,    83,    70,     0,    63,     0,    84,     0,    83,    84,
     0,    63,     0,    64,     0,    71,     0,     0,    86,     0,
    87,     0,    86,    87,     0,    63,     0,    64,     0,    65,
     0,     0,    68,    88,   106,    68,     0,    72,   104,    72,
     0,    66,     0,    69,     0,    70,     0,     0,    71,    67,
    89,    85,     0,    91,     0,    92,     0,    40,     0,    41,
     0,    31,     0,    32,     0,    33,     0,     9,     0,    35,
     0,    36,     0,    37,     0,    38,     0,    39,     0,    43,
     0,    34,     0,    42,     0,    48,     0,    49,     0,    51,
     0,    52,     0,    53,     0,    30,     0,    54,     0,    55,
     0,    56,     0,    57,     0,    58,     0,    59,     0,    60,
     0,    61,     0,    62,     0,    44,     0,    93,     0,     0,
    96,    94,    97,     0,     0,    47,    95,    97,     0,    45,
     0,    46,     0,    50,     0,     0,    63,     0,    19,     0,
    20,     0,    21,     0,    22,     0,    24,     0,    25,     0,
    26,     0,    27,     0,    28,     0,    23,     0,    29,     0,
    14,     0,    15,     0,    17,     0,    16,     0,    18,     0,
   101,     0,   100,   101,     0,    63,     0,    64,     0,    65,
     0,    69,     0,    70,     0,    72,   104,    72,     0,     0,
     0,    68,   102,   106,    68,   103,   105,     0,     0,    63,
     0,    64,     0,    65,     0,    68,     0,    66,     0,    71,
   108,     0,     0,    71,    67,     0,   107,     0,   106,   107,
     0,     0,    63,     0,    64,     0,    65,     0,    69,     0,
    70,     0,    72,     0,    66,     0,    71,   108,     0,    63,
     0,    64,     0,    65,     0,    68,     0,    71,     0,    72,
     0,    69,     0,    70,     0,    67,     0
};

#endif

#if YYDEBUG != 0
static const short yyrline[] = { 0,
   205,   209,   211,   214,   216,   217,   218,   219,   220,   221,
   230,   233,   234,   235,   236,   238,   240,   242,   243,   244,
   245,   246,   247,   248,   249,   250,   253,   255,   256,   259,
   261,   264,   266,   267,   274,   275,   278,   280,   283,   285,
   286,   287,   288,   289,   290,   291,   292,   293,   295,   297,
   299,   302,   304,   305,   306,   307,   308,   309,   310,   311,
   312,   313,   314,   315,   316,   317,   318,   319,   320,   321,
   322,   323,   324,   325,   326,   327,   328,   329,   330,   331,
   332,   335,   339,   342,   342,   344,   346,   348,   349,   352,
   353,   356,   358,   359,   360,   361,   362,   363,   364,   365,
   366,   367,   370,   372,   373,   374,   375,   378,   380,   383,
   385,   386,   387,   388,   389,   390,   391,   393,   395,   396,
   397,   398,   399,   400,   401,   405,   406,   409,   411,   415,
   416,   417,   418,   419,   420,   421,   422,   423,   426,   428,
   429,   430,   431,   432,   433,   434,   435
};

static const char * const yytname[] = {   "$","error","$illegal.","T_INCLUDE",
"T_DEFINE","T_UNDEF","T_PRAGMA","T_LINE","T_ERROR","T_IF","T_IFDEF","T_IFNDEF",
"T_ELIF","T_ENDIF","T_AUTO","T_EXTERN","T_REGISTER","T_STATIC","T_USERSTORAGE",
"T_CHAR","T_SHORT","T_INT","T_LONG","T_BOOL","T_SIGNED","T_UNSIGNED","T_FLOAT",
"T_DOUBLE","T_VOID","T_USERTYPE","T_TEMPLATE","T_SWITCH","T_CASE","T_BREAK",
"T_DEFAULT","T_ELSE","T_FOR","T_DO","T_WHILE","T_CONTINUE","T_CONST","T_VOLATILE",
"T_GOTO","T_RETURN","T_USERKEYWORD","T_STRUCT","T_UNION","T_ENUM","T_TYPEDEF",
"T_SIZEOF","T_CLASS","T_PUBLIC","T_PRIVATE","T_PROTECTED","T_VIRTUAL","T_FRIEND",
"T_NEW","T_DELETE","T_OPERATOR","T_TRY","T_CATCH","T_THROW","T_INLINE","T_ID",
"T_CHR","T_NUMBER","'#'","'\\n'","'\"'","'<'","'>'","'\\\\'","'\\''","input",
"input2","statement","@@1","cppline","@@2","@@3","@@4","cppkeyword","include","headerstring",
"headerstringtoken","definelist","definetextlist","definetext","@@5","@@6","keywords",
"keywordsincomplete","keywordscomplete","elaborated_type_specifier","@@7","@@8",
"class_key","elaborated_type_specifier_name","simple_type_name","storage_class",
"textlist","text","@@9","@@10","char","stringend","stringinner","stringtoken",
"stringescaped",""
};
#endif

static const short yyr1[] = {     0,
    73,    74,    74,    76,    75,    75,    75,    75,    75,    75,
    77,    78,    77,    79,    80,    77,    81,    81,    81,    81,
    81,    81,    81,    81,    81,    81,    82,    82,    82,    83,
    83,    84,    84,    84,    85,    85,    86,    86,    87,    87,
    87,    88,    87,    87,    87,    87,    87,    89,    87,    90,
    90,    91,    91,    91,    91,    91,    91,    91,    91,    91,
    91,    91,    91,    91,    91,    91,    91,    91,    91,    91,
    91,    91,    91,    91,    91,    91,    91,    91,    91,    91,
    91,    92,    94,    93,    95,    93,    96,    96,    96,    97,
    97,    98,    98,    98,    98,    98,    98,    98,    98,    98,
    98,    98,    99,    99,    99,    99,    99,   100,   100,   101,
   101,   101,   101,   101,   101,   102,   103,   101,   104,   104,
   104,   104,   104,   104,   104,   105,   105,   106,   106,   107,
   107,   107,   107,   107,   107,   107,   107,   107,   108,   108,
   108,   108,   108,   108,   108,   108,   108
};

static const short yyr2[] = {     0,
     1,     1,     2,     0,     3,     1,     1,     1,     1,     1,
     1,     0,     3,     0,     0,     5,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     3,     3,     1,     1,
     2,     1,     1,     1,     0,     1,     1,     2,     1,     1,
     1,     0,     4,     3,     1,     1,     1,     0,     4,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     0,     3,     0,     3,     1,     1,     1,     0,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     2,     1,
     1,     1,     1,     1,     3,     0,     0,     6,     0,     1,
     1,     1,     1,     1,     2,     0,     2,     1,     2,     0,
     1,     1,     1,     1,     1,     1,     1,     2,     1,     1,
     1,     1,     1,     1,     1,     1,     1
};

static const short yydefact[] = {     0,
    57,   103,   104,   106,   105,   107,    92,    93,    94,    95,
   101,    96,    97,    98,    99,   100,   102,    71,    54,    55,
    56,    64,    58,    59,    60,    61,    62,    52,    53,    65,
    63,    81,    87,    88,    85,    66,    67,    89,    68,    69,
    70,    72,    73,    74,    75,    76,    77,    78,    79,    80,
   110,   111,   112,     4,     6,   116,   113,   114,   119,     1,
     2,     9,    50,    51,    82,    83,     7,     8,    10,   108,
    90,     0,   130,   120,   121,   122,   124,   123,     0,     0,
     3,    90,   109,    91,    86,    12,    14,    17,    18,    19,
    20,    21,    22,    23,    24,    25,    26,     5,    11,   131,
   132,   133,   137,   134,   135,     0,   136,     0,   128,   139,
   140,   141,   147,   142,   145,   146,   143,   144,   125,   115,
    84,     0,     0,   138,   117,   129,    29,     0,     0,    13,
    15,   126,    32,    33,    34,     0,    30,     0,    35,     0,
   118,    27,    31,    28,    39,    40,    41,    45,    42,    46,
    47,     0,   119,    16,    36,    37,   127,   130,    48,     0,
    38,     0,    35,    44,    43,    49,     0,     0,     0
};

static const short yydefgoto[] = {   167,
    60,    61,    72,    98,   122,   123,   139,    99,   130,   136,
   137,   154,   155,   156,   158,   163,    62,    63,    64,    65,
    82,    71,    66,    85,    67,    68,    69,    70,    73,   132,
    80,   141,   108,   109,   119
};

static const short yypact[] = {    -9,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    79,    -9,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    69,-32768,
   -61,    61,    59,-32768,-32768,-32768,-32768,-32768,    12,   -68,
-32768,   -61,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,    12,-32768,    22,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,    97,    15,-32768,-32768,-32768,-32768,    91,    91,-32768,
-32768,    18,-32768,-32768,-32768,    85,-32768,    88,    34,    28,
-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,    40,    79,-32768,    34,-32768,-32768,    59,-32768,    29,
-32768,    49,    34,-32768,-32768,-32768,   108,   109,-32768
};

static const short yypgoto[] = {-32768,
-32768,    50,-32768,-32768,-32768,-32768,-32768,-32768,-32768,   -18,
  -135,   -37,-32768,   -28,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,    53,-32768,-32768,-32768,    67,-32768,-32768,
   -13,-32768,   -12,   -46,    51
};


#define	YYLAST		166


static const short yytable[] = {     1,
   143,    84,   143,   120,     2,     3,     4,     5,     6,     7,
     8,     9,    10,    11,    12,    13,    14,    15,    16,    17,
    18,    19,    20,    21,    22,    23,    24,    25,    26,    27,
    28,    29,    30,    31,    32,    33,    34,    35,    36,    37,
    38,    39,    40,    41,    42,    43,    44,    45,    46,    47,
    48,    49,    50,    51,    52,    53,    54,    55,    56,    57,
    58,   126,    59,    86,    87,    88,    89,    90,    91,    92,
    93,    94,    95,    96,   110,   111,   112,   131,   113,   114,
   115,   116,   117,   118,   100,   101,   102,   103,   140,   125,
   104,   105,   106,   107,   157,    97,   145,   146,   147,   148,
   164,   149,   150,   151,   152,   153,   159,   168,   169,    81,
   138,   100,   101,   102,   103,   126,   165,   104,   105,   106,
   107,   100,   101,   102,   103,   166,   161,   104,   105,   106,
   107,    51,    52,    53,   121,    83,    56,    57,    58,   160,
    59,    74,    75,    76,    77,   162,    78,   133,   134,    79,
   133,   134,   142,   133,   134,   135,   124,   144,   135,   127,
     0,   135,     0,     0,   128,   129
};

static const short yycheck[] = {     9,
   136,    63,   138,    72,    14,    15,    16,    17,    18,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
    50,    51,    52,    53,    54,    55,    56,    57,    58,    59,
    60,    61,    62,    63,    64,    65,    66,    67,    68,    69,
    70,   108,    72,     3,     4,     5,     6,     7,     8,     9,
    10,    11,    12,    13,    63,    64,    65,    63,    67,    68,
    69,    70,    71,    72,    63,    64,    65,    66,    71,    68,
    69,    70,    71,    72,    67,    35,    63,    64,    65,    66,
    72,    68,    69,    70,    71,    72,    67,     0,     0,    60,
   129,    63,    64,    65,    66,   162,    68,    69,    70,    71,
    72,    63,    64,    65,    66,   163,   155,    69,    70,    71,
    72,    63,    64,    65,    82,    69,    68,    69,    70,   153,
    72,    63,    64,    65,    66,   158,    68,    63,    64,    71,
    63,    64,    68,    63,    64,    71,   106,    70,    71,    63,
    -1,    71,    -1,    -1,    68,    69
};
#define YYPURE 1

/* -*-C-*-  Note some compilers choke on comments on `#line' lines.  */
#line 3 "/usr/local/share/bison.simple"

/* Skeleton output parser for bison,
	Copyright (C) 1984, 1989, 1990 Free Software Foundation, Inc.

	This program is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2, or (at your option)
	any later version.

	This program is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with this program; if not, write to the Free Software
	Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */

/* As a special exception, when this file is copied by Bison into a
	Bison output file, you may use that output file without restriction.
	This special exception was added by the Free Software Foundation
	in version 1.24 of Bison.  */

#ifdef __SASC
#ifndef alloca
#define alloca    malloc
#endif
#ifndef printf
#define printf Printf
#endif
static void __yy_memcpy (char *from,char *to,int count);
#endif

#ifndef alloca
#ifdef __GNUC__
#define alloca __builtin_alloca
#else /* not GNU C.  */
#if (!defined (__STDC__) && defined (sparc)) || defined (__sparc__) || defined (__sparc) || defined (__sgi)
#include <alloca.h>
#else /* not sparc */
#if defined (MSDOS) && !defined (__TURBOC__)
#include <malloc.h>
#else /* not MSDOS, or __TURBOC__ */
#if defined(_AIX)
#include <malloc.h>
 #pragma alloca
#else /* not MSDOS, __TURBOC__, or _AIX */
#ifdef __hpux
#ifdef __cplusplus
extern "C" {
void *alloca (unsigned int);
};
#else /* not __cplusplus */
void *alloca ();
#endif /* not __cplusplus */
#endif /* __hpux */
#endif /* not _AIX */
#endif /* not MSDOS, or __TURBOC__ */
#endif /* not sparc.  */
#endif /* not GNU C.  */
#endif /* alloca not defined.  */

/* This is the parser code that is written into each bison parser
  when the %semantic_parser declaration is not specified in the grammar.
  It was written by Richard Stallman by simplifying the hairy parser
  used when %semantic_parser is specified.  */

/* Note: there must be only one dollar sign in this file.
	It is replaced by the list of actions, each action
	as one case of the switch.  */

#define yyerrok         (yyerrstatus = 0)
#define yyclearin       (yychar = YYEMPTY)
#define YYEMPTY         -2
#define YYEOF           0
#define YYACCEPT        return(0)
#define YYABORT         return(1)
#define YYERROR         goto yyerrlab1
/* Like YYERROR except do call yyerror.
	This remains here temporarily to ease the
	transition to the new meaning of YYERROR, for GCC.
	Once GCC version 2 has supplanted version 1, this can go.  */
#define YYFAIL          goto yyerrlab
#define YYRECOVERING()  (!!yyerrstatus)
#define YYBACKUP(token, value) \
do                                                              \
  if (yychar == YYEMPTY && yylen == 1)                          \
	 { yychar = (token), yylval = (value);                       \
		yychar1 = YYTRANSLATE (yychar);                           \
		YYPOPSTACK;                                               \
		goto yybackup;                                            \
	 }                                                           \
  else                                                          \
	 { yyerror ("syntax error: cannot back up"); YYERROR; }      \
while (0)

#define YYTERROR        1
#define YYERRCODE       256

#ifndef YYPURE
#define YYLEX           yylex()
#endif

#ifdef YYPURE
#ifdef YYLSP_NEEDED
#ifdef YYLEX_PARAM
#define YYLEX           yylex(&yylval, &yylloc, YYLEX_PARAM)
#else
#define YYLEX           yylex(&yylval, &yylloc)
#endif
#else /* not YYLSP_NEEDED */
#ifdef YYLEX_PARAM
#define YYLEX           yylex(&yylval, YYLEX_PARAM)
#else
#define YYLEX           yylex(&yylval)
#endif
#endif /* not YYLSP_NEEDED */
#endif

/* If nonreentrant, generate the variables here */

#ifndef YYPURE

int     yychar;                 /*  the lookahead symbol                */
YYSTYPE yylval;                 /*  the semantic value of the           */
				/*  lookahead symbol                    */

#ifdef YYLSP_NEEDED
YYLTYPE yylloc;                 /*  location data for the lookahead     */
				/*  symbol                              */
#endif

int yynerrs;                    /*  number of parse errors so far       */
#endif  /* not YYPURE */

#if YYDEBUG != 0
int yydebug;                    /*  nonzero means print parse trace     */
/* Since this is uninitialized, it does not stop multiple parsers
	from coexisting.  */
#endif

/*  YYINITDEPTH indicates the initial size of the parser's stacks       */

#ifndef YYINITDEPTH
#define YYINITDEPTH 200
#endif

/*  YYMAXDEPTH is the maximum size the stacks can grow to
	 (effective only if the built-in stack extension method is used).  */

#if YYMAXDEPTH == 0
#undef YYMAXDEPTH
#endif

#ifndef YYMAXDEPTH
#define YYMAXDEPTH 10000
#endif

#ifndef YYPARSE_PARAM
#define YYPARSE_PARAM            void
#endif

/* Prevent warning if -Wstrict-prototypes.  */
#ifdef __GNUC__
int yyparse (YYPARSE_PARAM);
#endif

#if __GNUC__ > 1                /* GNU C and GNU C++ define this.  */
#define __yy_memcpy(FROM,TO,COUNT)      __builtin_memcpy(TO,FROM,COUNT)
#else                           /* not GNU C or C++ */
#ifndef __cplusplus

/* This is the most reliable way to avoid incompatibilities
	in available built-in functions on various systems.  */
static void
__yy_memcpy (from, to, count)
	  char *from;
	  char *to;
	  int count;
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
	 *t++ = *f++;
}

#else /* __cplusplus */

/* This is the most reliable way to avoid incompatibilities
	in available built-in functions on various systems.  */
static void
__yy_memcpy (char *from, char *to, int count)
{
  register char *f = from;
  register char *t = to;
  register int i = count;

  while (i-- > 0)
	 *t++ = *f++;
}

#endif
#endif

#line 196 "/usr/local/share/bison.simple"

int
yyparse(YYPARSE_PARAM)
{
  register int yystate;
  register int yyn;
  register short *yyssp;
  register YYSTYPE *yyvsp;
  int yyerrstatus;      /*  number of tokens to shift before error messages enabled */
  int yychar1;              /*  lookahead token as an internal (translated) token number */

  short yyssa[YYINITDEPTH];     /*  the state stack                     */
  YYSTYPE yyvsa[YYINITDEPTH];   /*  the semantic value stack            */

  short *yyss = yyssa;          /*  refer to the stacks thru separate pointers */
  YYSTYPE *yyvs = yyvsa;        /*  to allow yyoverflow to reallocate them elsewhere */

#ifdef YYLSP_NEEDED
  YYLTYPE yylsa[YYINITDEPTH];   /*  the location stack                  */
  YYLTYPE *yyls = yylsa;
  YYLTYPE *yylsp;

#define YYPOPSTACK   (yyvsp--, yyssp--, yylsp--)
#else
#define YYPOPSTACK   (yyvsp--, yyssp--)
#endif

  int yystacksize = YYINITDEPTH;

#ifdef YYPURE
  int yychar;
  YYSTYPE yylval;
  int yynerrs;
#ifdef YYLSP_NEEDED
  YYLTYPE yylloc;
#endif
#endif

  YYSTYPE yyval;                /*  the variable used to return         */
				/*  semantic values from the action     */
				/*  routines                            */

  int yylen;

#if YYDEBUG != 0
  if (yydebug)
	 printf("Starting parse\n");
#endif

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;             /* Cause a token to be read.  */

  /* Initialize stack pointers.
	  Waste one element of value and location stack
	  so that they stay on the same level as the state stack.
	  The wasted elements are never initialized.  */

  yyssp = yyss - 1;
  yyvsp = yyvs;
#ifdef YYLSP_NEEDED
  yylsp = yyls;
#endif

/* Push a new state, which is found in  yystate  .  */
/* In all cases, when you get here, the value and location stacks
	have just been pushed. so pushing a state here evens the stacks.  */
yynewstate:

  *++yyssp = yystate;

  if (yyssp >= yyss + yystacksize - 1)
	 {
		/* Give user a chance to reallocate the stack */
		/* Use copies of these so that the &'s don't force the real ones into memory. */
		YYSTYPE *yyvs1 = yyvs;
		short *yyss1 = yyss;
#ifdef YYLSP_NEEDED
		YYLTYPE *yyls1 = yyls;
#endif

		/* Get the current used size of the three stacks, in elements.  */
		int size = yyssp - yyss + 1;

#ifdef yyoverflow
		/* Each stack pointer address is followed by the size of
	 the data in use in that stack, in bytes.  */
#ifdef YYLSP_NEEDED
		/* This used to be a conditional around just the two extra args,
	 but that might be undefined if yyoverflow is a macro.  */
		yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yyls1, size * sizeof (*yylsp),
		 &yystacksize);
#else
		yyoverflow("parser stack overflow",
		 &yyss1, size * sizeof (*yyssp),
		 &yyvs1, size * sizeof (*yyvsp),
		 &yystacksize);
#endif

		yyss = yyss1; yyvs = yyvs1;
#ifdef YYLSP_NEEDED
		yyls = yyls1;
#endif
#else /* no yyoverflow */
		/* Extend the stack our own way.  */
		if (yystacksize >= YYMAXDEPTH)
	{
	  yyerror("parser stack overflow");
	  return 2;
	}
		yystacksize *= 2;
		if (yystacksize > YYMAXDEPTH)
	yystacksize = YYMAXDEPTH;
		yyss = (short *) alloca (yystacksize * sizeof (*yyssp));
		__yy_memcpy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
		yyvs = (YYSTYPE *) alloca (yystacksize * sizeof (*yyvsp));
		__yy_memcpy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
#ifdef YYLSP_NEEDED
		yyls = (YYLTYPE *) alloca (yystacksize * sizeof (*yylsp));
		__yy_memcpy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
#endif
#endif /* no yyoverflow */

		yyssp = yyss + size - 1;
		yyvsp = yyvs + size - 1;
#ifdef YYLSP_NEEDED
		yylsp = yyls + size - 1;
#endif

#if YYDEBUG != 0
		if (yydebug)
	printf("Stack size increased to %d\n", yystacksize);
#endif

		if (yyssp >= yyss + yystacksize - 1)
	YYABORT;
	 }

#if YYDEBUG != 0
  if (yydebug)
	 printf("Entering state %d\n", yystate);
#endif

  goto yybackup;
 yybackup:

/* Do appropriate processing given the current state.  */
/* Read a lookahead token if we need one and don't already have one.  */
/* yyresume: */

  /* First try to decide what to do without reference to lookahead token.  */

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
	 goto yydefault;

  /* Not known => get a lookahead token if don't already have one.  */

  /* yychar is either YYEMPTY or YYEOF
	  or a valid token in external form.  */

  if (yychar == YYEMPTY)
	 {
#if YYDEBUG != 0
		if (yydebug)
	printf("Reading a token: ");
#endif
		yychar = YYLEX;
	 }

  /* Convert token to internal form (in yychar1) for indexing tables with */

  if (yychar <= 0)              /* This means end of input. */
	 {
		yychar1 = 0;
		yychar = YYEOF;           /* Don't call YYLEX any more */

#if YYDEBUG != 0
		if (yydebug)
	printf("Now at end of input.\n");
#endif
	 }
  else
	 {
		yychar1 = YYTRANSLATE(yychar);

#if YYDEBUG != 0
		if (yydebug)
	{
	  printf ("Next token is %d (%s", yychar, yytname[yychar1]);
	  /* Give the individual parser a way to print the precise meaning
		  of a token, for further debugging info.  */
#ifdef YYPRINT
	  YYPRINT (stderr, yychar, yylval);
#endif
	  printf (")\n");
	}
#endif
	 }

  yyn += yychar1;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
	 goto yydefault;

  yyn = yytable[yyn];

  /* yyn is what to do for this token type in this state.
	  Negative => reduce, -yyn is rule number.
	  Positive => shift, yyn is new state.
		 New state is final state => don't bother to shift,
		 just return success.
	  0, or most negative number => error.  */

  if (yyn < 0)
	 {
		if (yyn == YYFLAG)
	goto yyerrlab;
		yyn = -yyn;
		goto yyreduce;
	 }
  else if (yyn == 0)
	 goto yyerrlab;

  if (yyn == YYFINAL)
	 YYACCEPT;

  /* Shift the lookahead token.  */

#if YYDEBUG != 0
  if (yydebug)
	 printf("Shifting token %d (%s), ", yychar, yytname[yychar1]);
#endif

  /* Discard the token being shifted unless it is eof.  */
  if (yychar != YYEOF)
	 yychar = YYEMPTY;

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  /* count tokens shifted since error; after three, turn off error status.  */
  if (yyerrstatus) yyerrstatus--;

  yystate = yyn;
  goto yynewstate;

/* Do the default action for the current state.  */
yydefault:

  yyn = yydefact[yystate];
  if (yyn == 0)
	 goto yyerrlab;

/* Do a reduction.  yyn is the number of a rule to reduce with.  */
yyreduce:
  yylen = yyr2[yyn];
  if (yylen > 0)
	 yyval = yyvsp[1-yylen]; /* implement default value of the action */

#if YYDEBUG != 0
  if (yydebug)
	 {
		int i;

		printf ("Reducing via rule %d (line %d), ",
			 yyn, yyrline[yyn]);

		/* Print the symbols being reduced, and their result.  */
		for (i = yyprhs[yyn]; yyrhs[i] > 0; i++)
	printf ("%s ", yytname[yyrhs[i]]);
		printf (" -> %s\n", yytname[yyr1[yyn]]);
	 }
#endif


  switch (yyn) {

case 1:
#line 206 "cdt.y"
{ if(!(LASTLF)) add_line(cparse,&cparse->Data->cd_CStyle[C_STANDARD],"\n",1); ;
    break;}
case 4:
#line 215 "cdt.y"
{ push_mode(C_CPP); ;
    break;}
case 5:
#line 216 "cdt.y"
{ pop_mode; ;
    break;}
case 6:
#line 217 "cdt.y"
{ add_cexpr(C_STANDARD); ;
    break;}
case 7:
#line 218 "cdt.y"
{ add_cexpr(C_TYPES);   ;
    break;}
case 8:
#line 219 "cdt.y"
{ add_cexpr(C_STORAGE); ;
    break;}
case 11:
#line 231 "cdt.y"
{ add_cexpr(C_CPP); ;
    break;}
case 12:
#line 233 "cdt.y"
{ add_cexpr(C_CPP); ;
    break;}
case 13:
#line 234 "cdt.y"
{ add_cexpr(C_HEADER); ;
    break;}
case 14:
#line 235 "cdt.y"
{ add_cexpr(C_CPP); replace_mode(C_STANDARD); ;
    break;}
case 15:
#line 236 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 39:
#line 284 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 40:
#line 285 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 41:
#line 286 "cdt.y"
{ add_cexpr(C_NUMBER);   ;
    break;}
case 42:
#line 287 "cdt.y"
{ cparse->TxtPtr = --cparse->ActPtr; add_cexpr(C_STANDARD); cparse->TxtPtr = ++cparse->ActPtr; push_mode(C_STRING); ;
    break;}
case 43:
#line 288 "cdt.y"
{ add_cexpr(C_STRING);   pop_mode; ;
    break;}
case 44:
#line 289 "cdt.y"
{ add_cexpr(C_STRING);   ;
    break;}
case 48:
#line 293 "cdt.y"
{ add_cexpr(C_STANDARD); ;
    break;}
case 50:
#line 298 "cdt.y"
{ add_cexpr(C_KEYWORD); ;
    break;}
case 83:
#line 340 "cdt.y"
{ add_cexpr(C_KEYWORD); ;
    break;}
case 85:
#line 342 "cdt.y"
{ add_cexpr(C_KEYWORD); ;
    break;}
case 91:
#line 353 "cdt.y"
{ add_cexpr(C_TYPENAME); ;
    break;}
case 110:
#line 384 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 111:
#line 385 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 112:
#line 386 "cdt.y"
{ add_cexpr(C_NUMBER); ;
    break;}
case 115:
#line 389 "cdt.y"
{ add_cexpr(C_STRING); ;
    break;}
case 116:
#line 390 "cdt.y"
{ cparse->TxtPtr = --cparse->ActPtr; add_cexpr(C_STANDARD); cparse->TxtPtr = ++cparse->ActPtr; push_mode(C_STRING); ;
    break;}
case 117:
#line 391 "cdt.y"
{ add_cexpr(C_STRING); pop_mode; ;
    break;}
case 127:
#line 406 "cdt.y"
{ add_cexpr(C_STANDARD); ;
    break;}
case 147:
#line 435 "cdt.y"
{ add_cexpr(C_STRING); ;
    break;}
}
   /* the action file gets copied in in place of this dollarsign */
#line 487 "/usr/local/share/bison.simple"

  yyvsp -= yylen;
  yyssp -= yylen;
#ifdef YYLSP_NEEDED
  yylsp -= yylen;
#endif

#if YYDEBUG != 0
  if (yydebug)
	 {
		short *ssp1 = yyss - 1;
		printf ("state stack now");
		while (ssp1 != yyssp)
	printf (" %d", *++ssp1);
		printf ("\n");
	 }
#endif

  *++yyvsp = yyval;

#ifdef YYLSP_NEEDED
  yylsp++;
  if (yylen == 0)
	 {
		yylsp->first_line = yylloc.first_line;
		yylsp->first_column = yylloc.first_column;
		yylsp->last_line = (yylsp-1)->last_line;
		yylsp->last_column = (yylsp-1)->last_column;
		yylsp->text = 0;
	 }
  else
	 {
		yylsp->last_line = (yylsp+yylen-1)->last_line;
		yylsp->last_column = (yylsp+yylen-1)->last_column;
	 }
#endif

  /* Now "shift" the result of the reduction.
	  Determine what state that goes to,
	  based on the state we popped back to
	  and the rule number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
  if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
	 yystate = yytable[yystate];
  else
	 yystate = yydefgoto[yyn - YYNTBASE];

  goto yynewstate;

yyerrlab:   /* here on detecting error */

  if (! yyerrstatus)
	 /* If not already recovering from an error, report this error.  */
	 {
		++yynerrs;

#ifdef YYERROR_VERBOSE
		yyn = yypact[yystate];

		if (yyn > YYFLAG && yyn < YYLAST)
	{
	  int size = 0;
	  char *msg;
	  int x, count;

	  count = 0;
	  /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
	  for (x = (yyn < 0 ? -yyn : 0);
			 x < (sizeof(yytname) / sizeof(char *)); x++)
		 if (yycheck[x + yyn] == x)
			size += strlen(yytname[x]) + 15, count++;
	  msg = (char *) malloc(size + 15);
	  if (msg != 0)
		 {
			strcpy(msg, "parse error");

			if (count < 5)
		{
		  count = 0;
		  for (x = (yyn < 0 ? -yyn : 0);
				 x < (sizeof(yytname) / sizeof(char *)); x++)
			 if (yycheck[x + yyn] == x)
				{
			strcat(msg, count == 0 ? ", expecting `" : " or `");
			strcat(msg, yytname[x]);
			strcat(msg, "'");
			count++;
				}
		}
			yyerror(msg);
			free(msg);
		 }
	  else
		 yyerror ("parse error; also virtual memory exceeded");
	}
		else
#endif /* YYERROR_VERBOSE */
	yyerror("parse error");
	 }

  goto yyerrlab1;
yyerrlab1:   /* here on error raised explicitly by an action */

  if (yyerrstatus == 3)
	 {
		/* if just tried and failed to reuse lookahead token after an error, discard it.  */

		/* return failure if at end of input */
		if (yychar == YYEOF)
	YYABORT;

#if YYDEBUG != 0
		if (yydebug)
	printf("Discarding token %d (%s).\n", yychar, yytname[yychar1]);
#endif

		yychar = YYEMPTY;
	 }

  /* Else will try to reuse lookahead token
	  after shifting the error token.  */

  yyerrstatus = 3;              /* Each real token shifted decrements this */

  goto yyerrhandle;

yyerrdefault:  /* current state does not do anything special for the error token. */

#if 0
  /* This is wrong; only states that explicitly want error tokens
	  should shift them.  */
  yyn = yydefact[yystate];  /* If its default is to accept any token, ok.  Otherwise pop it.*/
  if (yyn) goto yydefault;
#endif

yyerrpop:   /* pop the current state because it cannot handle the error token */

  if (yyssp == yyss) YYABORT;
  yyvsp--;
  yystate = *--yyssp;
#ifdef YYLSP_NEEDED
  yylsp--;
#endif

#if YYDEBUG != 0
  if (yydebug)
	 {
		short *ssp1 = yyss - 1;
		printf ("Error: state stack now");
		while (ssp1 != yyssp)
	printf (" %d", *++ssp1);
		printf ("\n");
	 }
#endif

yyerrhandle:

  yyn = yypact[yystate];
  if (yyn == YYFLAG)
	 goto yyerrdefault;

  yyn += YYTERROR;
  if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
	 goto yyerrdefault;

  yyn = yytable[yyn];
  if (yyn < 0)
	 {
		if (yyn == YYFLAG)
	goto yyerrpop;
		yyn = -yyn;
		goto yyreduce;
	 }
  else if (yyn == 0)
	 goto yyerrpop;

  if (yyn == YYFINAL)
	 YYACCEPT;

#if YYDEBUG != 0
  if (yydebug)
	 printf("Shifting error token, ");
#endif

  *++yyvsp = yylval;
#ifdef YYLSP_NEEDED
  *++yylsp = yylloc;
#endif

  yystate = yyn;
  goto yynewstate;
}
#line 438 "cdt.y"


/*FS*/ /*"Keyword definition"*/
struct Keyword
{
	STRPTR k_Word;
	int k_ID;
	int k_Len;
};

struct Keyword keywords[] =
{
	{"auto"     ,T_AUTO      ,4},
	{"break"    ,T_BREAK     ,5},
	{"case"     ,T_CASE      ,4},
	{"char"     ,T_CHAR      ,4},
	{"const"    ,T_CONST     ,5},
	{"continue" ,T_CONTINUE  ,8},
	{"default"  ,T_DEFAULT   ,7},
	{"do"       ,T_DO        ,2},
	{"double"   ,T_DOUBLE    ,6},
	{"else"     ,T_ELSE      ,4},
	{"enum"     ,T_ENUM      ,4},
	{"extern"   ,T_EXTERN    ,6},
	{"float"    ,T_FLOAT     ,5},
	{"for"      ,T_FOR       ,3},
	{"goto"     ,T_GOTO      ,4},
	{"if"       ,T_IF        ,2},
	{"int"      ,T_INT       ,3},
	{"long"     ,T_LONG      ,4},
	{"register" ,T_REGISTER  ,8},
	{"return"   ,T_RETURN    ,6},
	{"short"    ,T_SHORT     ,5},
	{"signed"   ,T_SIGNED    ,6},
	{"sizeof"   ,T_SIZEOF    ,6},
	{"static"   ,T_STATIC    ,6},
	{"struct"   ,T_STRUCT    ,6},
	{"switch"   ,T_SWITCH    ,6},
	{"typedef"  ,T_TYPEDEF   ,7},
	{"union"    ,T_UNION     ,5},
	{"unsigned" ,T_UNSIGNED  ,8},
	{"void"     ,T_VOID      ,4},
	{"volatile" ,T_VOLATILE  ,8},
	{"while"    ,T_WHILE     ,5},
	{NULL       ,0}
};

struct Keyword cpluspluskeywords[] =
{
	{"bool"     ,T_BOOL      ,4},
	{"catch"    ,T_CATCH     ,5},
	{"class"    ,T_CLASS     ,5},
	{"delete"   ,T_DELETE    ,6},
	{"friend"   ,T_FRIEND    ,6},
	{"inline"   ,T_INLINE    ,6},
	{"new"      ,T_NEW       ,3},
	{"operator" ,T_OPERATOR  ,8},
	{"private"  ,T_PRIVATE   ,7},
	{"protected",T_PROTECTED ,9},
	{"public"   ,T_PUBLIC    ,6},
	{"template" ,T_TEMPLATE  ,8},
	{"throw"    ,T_THROW     ,5},
	{"try"      ,T_TRY       ,3},
	{"virtual"  ,T_VIRTUAL   ,7},
	{NULL       ,0}
};

struct Keyword cppkeywords[] =
{
	{"define"   ,T_DEFINE    ,6},
	{"elif"     ,T_ELIF      ,4},
	{"else"     ,T_ELSE      ,4},
	{"endif"    ,T_ENDIF     ,5},
	{"error"    ,T_ERROR     ,5},
	{"if"       ,T_IF        ,2},
	{"ifdef"    ,T_IFDEF     ,5},
	{"ifndef"   ,T_IFNDEF    ,6},
	{"include"  ,T_INCLUDE   ,7},
	{"line"     ,T_LINE      ,4},
	{"pragma"   ,T_PRAGMA    ,6},
	{"undef"    ,T_UNDEF     ,5},
	{NULL       ,0}
};
/*FE*/

/*FS*/ static int cdtparse_lex(int *lvalp,struct CParse *cparse)
{
	struct ClassBase *cb = cparse->ClassBase;
	struct CData *cd = cparse->Data;
	STRPTR ptr = cparse->ActPtr;
	STRPTR end = cparse->EndPtr;
	STRPTR name;
	ULONG tablen = cd->cd_TabLength;
	struct Keyword *kw = NULL;
	int retval = 0;
	int len;
	int tabs;
	int chrs;

	if(ptr < end)
	{
		UWORD mode = cparse->ModeStack[cparse->ModeSP];

		do
		{
			tabs = 0;
			chrs = cparse->Chars;

			while(ptr < end && (*ptr == ' ' || *ptr == '\t'))
			{
				if(*ptr++ == '\t')
				{
					chrs += (tablen - (chrs % tablen));
					tabs = 1;
				} else
					chrs++;
			}

			if(tabs)
			{
				if(mode != C_STANDARD)
					add_cexpr(mode);

				cparse->ActPtr = ptr;
				add_cexpr1(cparse,C_STANDARD,cparse->Data->cd_TabBuffer,chrs - cparse->Chars);
			}

			cparse->Chars = chrs;

			/* handle comments */
			if(*ptr == '/' && ptr < end - 1 && (ptr[1] == '*' || ptr[1] == '/') && mode != C_STRING)
			{
				cparse->TxtPtr = ptr;

				add_cexpr(C_COMMENT);

				push_mode(C_COMMENT);

				ptr += 2;
				if(ptr[-1] == '*')
				{
					int nested = 1;

					while(ptr < end && nested)
					{
						switch(*ptr)
						{
						case '*':
							if(ptr[1] == '/')
							{
								nested--;
								ptr++;
							}
							break;
						case '/':
							if(ptr[1] == '*' && cparse->Data->cd_Flags.Nested)
							{
								nested++;
								ptr++;
							}
							break;
						case '\n':
							ptr++;
							cparse->ActPtr = ptr;
							add_cexpr(C_COMMENT);
							cparse->Chars = 0;
							continue;
						case '\t':
							cparse->TxtPtr = ptr;

							chrs = cparse->Chars;

							while(*ptr == '\t' || *ptr == ' ')
							{
								if(*ptr++ == '\t')
									chrs += (tablen - (chrs % tablen));
								else
									chrs++;
							}

							cparse->ActPtr = ptr;
							add_cexpr1(cparse,C_COMMENT,cparse->Data->cd_TabBuffer,chrs - cparse->Chars);
							cparse->Chars  = chrs;

							ptr--;
							break;
						}
						cparse->Chars++;
						ptr++;
					}
					cparse->ActPtr = ptr;
					add_cexpr(C_COMMENT);
				} else
				{
					while(ptr < end && *ptr != '\n')
					{
						if(*ptr == '\t')
						{
							cparse->TxtPtr = ptr;
							chrs = cparse->Chars;

							while(*ptr == '\t')
							{
								chrs += (tablen - (chrs % tablen));
								ptr++;
							}

							cparse->ActPtr = ptr;
							add_cexpr1(cparse,C_COMMENT,cparse->Data->cd_TabBuffer,chrs - cparse->Chars);
							cparse->Chars = chrs;
						} else
							cparse->Chars++;
						ptr++;
					}
					cparse->ActPtr = ptr;

					add_cexpr(C_COMMENT);
				}

				pop_mode;
			} else
				break;

		} while(*ptr == ' ' || *ptr == '\t' || *ptr == '/');

		if(ptr < end)
		{
			if(isalpha(*ptr) || *ptr == '_')
			{
				name = ptr;

				while(ptr < end && (isalpha(*ptr) || isdigit(*ptr) || *ptr == '_'))
					ptr++;

				len  = (ptr - name);

				ptr--;

				retval = T_ID;

				/* only search for keyword if it is normal text or a cppline !!! */
				if(mode == C_CPP)
					kw = cppkeywords;
				else if(mode == C_STANDARD)
					kw = keywords;

				if(len > 1 && kw)
				{
					int cmp;

					while(kw->k_Word)
					{
						if(!(cmp = strncmp(kw->k_Word,name,len)))
						{
							DB(("len = %ld , strlen(kw) = %ld\n",len,kw->k_Len));
							if(len == kw->k_Len)
							{
								retval = kw->k_ID;
								break;
							}
						} else if(cmp > 0)
							break;
						kw++;
					}

					if(cmp != 0 && cparse->Language == LANG_CPLUSPLUS)
					{
						kw = cpluspluskeywords;
						while(kw->k_Word)
						{
							if(!(cmp = strncmp(kw->k_Word,name,len)))
							{
								DB(("len = %ld , strlen(kw) = %ld\n",len,kw->k_Len));
								if(len == kw->k_Len)
								{
									retval = kw->k_ID;
									break;
								}
							} else if(cmp > 0)
								break;
							kw++;
						}
					}

					/* try user defined type keywords */
					if(cmp)
					{
						struct Node *node;
						for(node = cd->cd_UserTypes.lh_Head ; node->ln_Succ ; node = node->ln_Succ)
						{
							if(len == node->ln_Type && !strncmp(node->ln_Name,name,len))
							{
								retval = T_USERTYPE;
								break;
							}
						}

						if(retval != T_USERTYPE)
						{
							for(node = cd->cd_UserKeywords.lh_Head ; node->ln_Succ ; node = node->ln_Succ)
							{
								if(len == node->ln_Type && !strncmp(node->ln_Name,name,len))
								{
									retval = T_USERKEYWORD;
									break;
								}
							}

							if(retval !=  T_USERKEYWORD)
								for(node = cd->cd_UserStorage.lh_Head ; node->ln_Succ ; node = node->ln_Succ)
								{
									if(len == node->ln_Type && !strncmp(node->ln_Name,name,len))
									{
										retval = T_USERSTORAGE;
										break;
									}
								}
						}
					}
				}
				cparse->Chars += len;
			} else if(isdigit(*ptr))
			{
				name = ptr;
				ptr++;

				if(*ptr == 'x' || *ptr == 'X')
				{
					ptr++;
					while(ptr < end && isxdigit(*ptr))
						ptr++;
				} else
				{
					while(ptr < end && isdigit(*ptr))
						ptr++;
				}

				cparse->Chars += (ptr - name);

				ptr--;

				retval = T_NUMBER;
			} else
			{
				retval = T_CHR;

				cparse->Chars++;
				switch(*ptr)
				{
				case '\n':
					cparse->Chars = 0;
				case '"':
				case '#':
				case '\\':
				case '\'':
				case '<':
				case '>':
					retval = *ptr;
					break;
				}
			}
			cparse->ActPtr = ptr + 1;
		}
	}

	if(SetSignal(0,SIGBREAKF_CTRL_C) & SIGBREAKF_CTRL_C)
	{
		DB(("break signal received !\n"));
		cparse->Break = 1;
		return(0);
	}
	return((cparse->Token = retval));
}
/*FE*/

/*FS*/ void *cdtparse_alloc(struct CParse *cparse,int size)
{
	struct ClassBase *cb = cparse->ClassBase;
	struct cdtMem *mem;

	size += sizeof(struct cdtMem);
	if((mem = AllocPooled(cparse->Data->cd_Pool,size)))
	{
		mem->Next = cparse->Memory;
		mem->Size = size;

		cparse->Memory = mem;
		mem++;
	}
	return(mem);
}
/*FE*/
/*FS*/ void cdtparse_free(struct CParse *cparse)
{
	struct ClassBase *cb = cparse->ClassBase;
	struct cdtMem *mem = cparse->Memory;
	struct cdtMem *next;

	while(mem)
	{
		next = mem->Next;
		FreePooled(cparse->Data->cd_Pool,mem,mem->Size);
		mem = next;
	}
}
/*FE*/

/*FS*/ int cdtparse_error(char *str)
{
	DB(("error : %s\n",str));
	return(0);
}
/*FE*/
/*FS*/ void cdtparse_parseerror(struct CParse *cparse,char *str)
{
	struct ClassBase *cb = cparse->ClassBase;
	char *buf;

	if((buf = AllocPooled(cparse->Data->cd_Pool,100)))
	{
		STRPTR seg,act;

		seg =
		act = cparse->ActPtr;

		if(*seg == '\n')
			seg--;

		add_line(cparse,&cparse->Data->cd_CStyle[C_STANDARD],"\n",1);

		sprintf(buf,"Parse Error : last Token %4ld for line : \n",cparse->Token);

		add_line(cparse,&cparse->Data->cd_CStyle[C_STANDARD],buf,strlen(buf));

		while(seg > cparse->BegPtr && *seg != '\n')
			seg--;

		if(*seg == '\n')
			seg++;

		while(act < cparse->EndPtr && *act != '\n')
			act++;

		if(*act == '\n')
			act++;

		if(act > seg)
			add_line(cparse,&cparse->Data->cd_CStyle[C_STANDARD],seg,act-seg);
	}
}
/*FE*/

@


39.16
log
@*** empty log	message	***
@
text
@d2 1
a2 1
/*  A Bison parser, made from cdt.y with Bison version GNU Bison version 1.24
d29 48
a76 47
#define	T_CHAR	273
#define	T_SHORT	274
#define	T_INT	275
#define	T_LONG	276
#define	T_BOOL	277
#define	T_SIGNED	278
#define	T_UNSIGNED	279
#define	T_FLOAT	280
#define	T_DOUBLE	281
#define	T_VOID	282
#define	T_USERTYPE	283
#define	T_TEMPLATE	284
#define	T_SWITCH	285
#define	T_CASE	286
#define	T_BREAK	287
#define	T_DEFAULT	288
#define	T_ELSE	289
#define	T_FOR	290
#define	T_DO	291
#define	T_WHILE	292
#define	T_CONTINUE	293
#define	T_CONST	294
#define	T_VOLATILE	295
#define	T_GOTO	296
#define	T_RETURN	297
#define	T_USERKEYWORD	298
#define	T_STRUCT	299
#define	T_UNION	300
#define	T_ENUM	301
#define	T_TYPEDEF	302
#define	T_SIZEOF	303
#define	T_CLASS	304
#define	T_PUBLIC	305
#define	T_PRIVATE	306
#define	T_PROTECTED	307
#define	T_VIRTUAL	308
#define	T_FRIEND	309
#define	T_NEW	310
#define	T_DELETE	311
#define	T_OPERATOR	312
#define	T_TRY	313
#define	T_CATCH	314
#define	T_THROW	315
#define	T_INLINE	316
#define	T_ID	317
#define	T_CHR	318
#define	T_NUMBER	319
d83 1
a83 1
** $VER: cdt.y 39.14 (07.08.95)
d94 1
a125 1

d195 1
a195 1
			add_line(cparse,&cparse->Data->cd_CStyle[(mode < C_MAX) ? mode : C_STANDARD],
d229 1
d262 1
d266 1
d270 1
a270 1
#define	YYFINAL		150
d272 1
a272 1
#define	YYNTBASE	70
d274 1
a274 1
#define YYTRANSLATE(x) ((unsigned)(x) <= 319 ? yytranslate[x] : 104)
d277 1
a277 2
     2,     2,     2,     2,     2,     2,     2,     2,     2,    66,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
a278 1
     2,     2,     2,    67,    65,     2,     2,     2,    68,     2,
d280 1
d282 2
d286 1
a286 2
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,    69,     2,     2,     2,     2,     2,     2,     2,     2,
d308 1
a308 1
    56,    57,    58,    59,    60,    61,    62,    63,    64
d313 15
a327 14
     0,     2,     5,     6,    10,    12,    14,    16,    18,    20,
    23,    24,    28,    29,    30,    36,    38,    40,    42,    44,
    46,    48,    50,    52,    54,    56,    58,    59,    61,    62,
    64,    66,    69,    71,    73,    75,    76,    81,    85,    87,
    88,    93,    95,    97,    99,   101,   103,   105,   107,   109,
   111,   113,   115,   117,   119,   121,   123,   125,   127,   129,
   131,   133,   135,   137,   139,   141,   143,   145,   147,   149,
   151,   153,   155,   157,   159,   160,   164,   165,   169,   171,
   173,   175,   176,   178,   180,   182,   184,   186,   188,   190,
   192,   194,   196,   198,   200,   202,   204,   206,   208,   210,
   213,   215,   217,   219,   223,   224,   225,   232,   233,   235,
   237,   239,   241,   243,   246,   247,   250,   252,   255,   256,
   258,   260,   262,   264,   266,   269,   271,   273,   275,   277,
   279,   281
d330 33
a362 30
static const short yyrhs[] = {    71,
     0,    70,    71,     0,     0,    65,    72,    73,     0,    66,
     0,    93,     0,    94,     0,    85,     0,    95,     0,    74,
    66,     0,     0,    78,    75,    79,     0,     0,     0,     4,
    76,    62,    77,    80,     0,     3,     0,     5,     0,     6,
     0,     7,     0,     8,     0,     9,     0,    10,     0,    11,
     0,    12,     0,    13,     0,    34,     0,     0,    95,     0,
     0,    81,     0,    82,     0,    81,    82,     0,    62,     0,
    63,     0,    64,     0,     0,    67,    83,   101,    67,     0,
    68,    99,    68,     0,    65,     0,     0,    69,    66,    84,
    80,     0,    86,     0,    87,     0,    39,     0,    40,     0,
    30,     0,    31,     0,    32,     0,     9,     0,    34,     0,
    35,     0,    36,     0,    37,     0,    38,     0,    42,     0,
    33,     0,    41,     0,    47,     0,    48,     0,    50,     0,
    51,     0,    52,     0,    29,     0,    53,     0,    54,     0,
    55,     0,    56,     0,    57,     0,    58,     0,    59,     0,
    60,     0,    61,     0,    43,     0,    88,     0,     0,    91,
    89,    92,     0,     0,    46,    90,    92,     0,    44,     0,
    45,     0,    49,     0,     0,    62,     0,    18,     0,    19,
     0,    20,     0,    21,     0,    23,     0,    24,     0,    25,
     0,    26,     0,    27,     0,    22,     0,    28,     0,    14,
     0,    15,     0,    17,     0,    16,     0,    96,     0,    95,
    96,     0,    62,     0,    63,     0,    64,     0,    68,    99,
    68,     0,     0,     0,    67,    97,   101,    67,    98,   100,
     0,     0,    62,     0,    63,     0,    64,     0,    67,     0,
    65,     0,    69,   103,     0,     0,    69,    66,     0,   102,
     0,   101,   102,     0,     0,    62,     0,    63,     0,    64,
     0,    68,     0,    65,     0,    69,   103,     0,    62,     0,
    63,     0,    64,     0,    67,     0,    69,     0,    68,     0,
    66,     0
d369 15
a383 14
   203,   205,   208,   211,   211,   212,   213,   214,   215,   218,
   222,   224,   225,   226,   227,   230,   232,   233,   234,   235,
   236,   237,   238,   239,   240,   241,   244,   245,   248,   249,
   252,   254,   257,   259,   260,   261,   262,   263,   264,   265,
   267,   269,   271,   274,   276,   277,   278,   279,   280,   281,
   282,   283,   284,   285,   286,   287,   288,   289,   290,   291,
   292,   293,   294,   295,   296,   297,   298,   299,   300,   301,
   302,   303,   304,   307,   311,   314,   314,   316,   318,   320,
   321,   324,   325,   328,   330,   331,   332,   333,   334,   335,
   336,   337,   338,   339,   342,   344,   345,   346,   349,   351,
   354,   356,   357,   358,   359,   360,   362,   364,   365,   366,
   367,   368,   369,   370,   374,   375,   378,   380,   384,   385,
   386,   387,   388,   389,   390,   393,   395,   396,   397,   398,
   399,   400
d386 1
a386 1
static const char * const yytname[] = {   "$","error","$undefined.","T_INCLUDE",
d388 12
a399 11
"T_ELIF","T_ENDIF","T_AUTO","T_EXTERN","T_REGISTER","T_STATIC","T_CHAR","T_SHORT",
"T_INT","T_LONG","T_BOOL","T_SIGNED","T_UNSIGNED","T_FLOAT","T_DOUBLE","T_VOID",
"T_USERTYPE","T_TEMPLATE","T_SWITCH","T_CASE","T_BREAK","T_DEFAULT","T_ELSE",
"T_FOR","T_DO","T_WHILE","T_CONTINUE","T_CONST","T_VOLATILE","T_GOTO","T_RETURN",
"T_USERKEYWORD","T_STRUCT","T_UNION","T_ENUM","T_TYPEDEF","T_SIZEOF","T_CLASS",
"T_PUBLIC","T_PRIVATE","T_PROTECTED","T_VIRTUAL","T_FRIEND","T_NEW","T_DELETE",
"T_OPERATOR","T_TRY","T_CATCH","T_THROW","T_INLINE","T_ID","T_CHR","T_NUMBER",
"'#'","'\\n'","'\"'","'\\''","'\\\\'","input","statement","@@1","cpp","cppline",
"@@2","@@3","@@4","cppkeyword","cpptextlist","definelist","definetextlist","definetext",
"@@5","@@6","keywords","keywordsincomplete","keywordscomplete","elaborated_type_specifier",
"@@7","@@8","class_key","elaborated_type_specifier_name","simple_type_name","storage_class",
d406 15
a420 14
    70,    70,    72,    71,    71,    71,    71,    71,    71,    73,
    75,    74,    76,    77,    74,    78,    78,    78,    78,    78,
    78,    78,    78,    78,    78,    78,    79,    79,    80,    80,
    81,    81,    82,    82,    82,    83,    82,    82,    82,    84,
    82,    85,    85,    86,    86,    86,    86,    86,    86,    86,
    86,    86,    86,    86,    86,    86,    86,    86,    86,    86,
    86,    86,    86,    86,    86,    86,    86,    86,    86,    86,
    86,    86,    86,    87,    89,    88,    90,    88,    91,    91,
    91,    92,    92,    93,    93,    93,    93,    93,    93,    93,
    93,    93,    93,    93,    94,    94,    94,    94,    95,    95,
    96,    96,    96,    96,    97,    98,    96,    99,    99,    99,
    99,    99,    99,    99,   100,   100,   101,   101,   102,   102,
   102,   102,   102,   102,   102,   103,   103,   103,   103,   103,
   103,   103
d424 7
a430 5
     1,     2,     0,     3,     1,     1,     1,     1,     1,     2,
     0,     3,     0,     0,     5,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     0,     1,     0,     1,
     1,     2,     1,     1,     1,     0,     4,     3,     1,     0,
     4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
d432 1
d434 5
a438 7
     1,     1,     1,     1,     0,     3,     0,     3,     1,     1,
     1,     0,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     2,
     1,     1,     1,     3,     0,     0,     6,     0,     1,     1,
     1,     1,     1,     2,     0,     2,     1,     2,     0,     1,
     1,     1,     1,     1,     2,     1,     1,     1,     1,     1,
     1,     1
d442 17
a458 15
    49,    95,    96,    98,    97,    84,    85,    86,    87,    93,
    88,    89,    90,    91,    92,    94,    63,    46,    47,    48,
    56,    50,    51,    52,    53,    54,    44,    45,    57,    55,
    73,    79,    80,    77,    58,    59,    81,    60,    61,    62,
    64,    65,    66,    67,    68,    69,    70,    71,    72,   101,
   102,   103,     3,     5,   105,   108,     0,     1,     8,    42,
    43,    74,    75,     6,     7,     9,    99,    82,     0,   119,
   109,   110,   111,   113,   112,     0,     0,     2,    82,   100,
    83,    78,    16,    13,    17,    18,    19,    20,    21,    22,
    23,    24,    25,    26,     4,     0,    11,   120,   121,   122,
   124,   123,     0,     0,   117,   126,   127,   128,   132,   129,
   131,   130,   114,   104,    76,     0,    10,    27,   125,   106,
   118,    14,    12,    28,   115,    29,     0,   107,    33,    34,
    35,    39,    36,   108,     0,    15,    30,    31,   116,   119,
     0,    40,    32,     0,    38,    29,    37,    41,     0,     0
d461 5
a465 5
static const short yydefgoto[] = {    57,
    58,    69,    95,    96,   118,   116,   126,    97,   123,   136,
   137,   138,   140,   146,    59,    60,    61,    62,    79,    68,
    63,    82,    64,    65,    66,    67,    70,   125,    77,   128,
   104,   105,   113
d468 1
a468 1
static const short yypact[] = {    60,
d474 4
a477 3
-32768,-32768,-32768,-32768,-32768,   103,     0,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   119,-32768,   -58,   127,   111,
-32768,-32768,-32768,-32768,-32768,   -61,   -57,-32768,   -58,-32768,
d479 7
a485 6
-32768,-32768,-32768,-32768,-32768,   -56,-32768,-32768,-32768,-32768,
-32768,-32768,   -61,    79,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,-32768,   -49,-32768,   119,-32768,-32768,
-32768,-32768,-32768,   119,     2,    87,     6,-32768,-32768,-32768,
-32768,-32768,-32768,   103,     7,-32768,    87,-32768,-32768,   111,
    77,-32768,-32768,    95,-32768,    87,-32768,-32768,   153,-32768
d489 4
a492 4
   114,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    31,
-32768,    41,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,   105,-32768,-32768,    67,   -54,-32768,-32768,    54,-32768,
    49,    25,    88
d496 1
a496 1
#define	YYLAST		191
d499 18
a516 21
static const short yytable[] = {   149,
   106,   107,   108,    81,   109,   110,   111,   112,     1,   117,
   114,    80,   122,     2,     3,     4,     5,     6,     7,     8,
     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
    39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
    49,    50,    51,    52,    53,    54,    55,    56,     1,    80,
   127,   139,   142,     2,     3,     4,     5,     6,     7,     8,
     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
    39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
    49,    50,    51,    52,    53,    54,    55,    56,   121,    83,
    84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
    98,    99,   100,   101,   145,   120,   102,   103,   129,   130,
   131,   132,   150,   133,   134,   135,    98,    99,   100,   101,
    94,   147,   102,   103,    71,    72,    73,    74,   121,    75,
    78,    76,    98,    99,   100,   101,   148,   143,   102,   103,
    50,    51,    52,   115,   124,    55,    56,   141,   144,     0,
   119
d519 18
a536 21
static const short yycheck[] = {     0,
    62,    63,    64,    62,    66,    67,    68,    69,     9,    66,
    68,    66,    62,    14,    15,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
    41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
    51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
    61,    62,    63,    64,    65,    66,    67,    68,     9,   124,
    69,    66,    66,    14,    15,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
    41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
    51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
    61,    62,    63,    64,    65,    66,    67,    68,   104,     3,
     4,     5,     6,     7,     8,     9,    10,    11,    12,    13,
    62,    63,    64,    65,    68,    67,    68,    69,    62,    63,
    64,    65,     0,    67,    68,    69,    62,    63,    64,    65,
    34,    67,    68,    69,    62,    63,    64,    65,   144,    67,
    57,    69,    62,    63,    64,    65,   146,   137,    68,    69,
    62,    63,    64,    79,   118,    67,    68,   134,   140,    -1,
   103
d1032 6
a1037 2
case 3:
#line 209 "cdt.y"
d1041 2
a1042 2
#line 211 "cdt.y"
{ add_cexpr(C_STANDARD); ;
d1045 2
a1046 2
#line 212 "cdt.y"
{ add_cexpr(C_TYPES);   ;
d1049 2
a1050 2
#line 213 "cdt.y"
{ add_cexpr(C_STORAGE); ;
d1052 1
a1052 1
case 10:
d1054 1
a1054 1
{ add_cexpr(C_STANDARD); ;
d1057 2
a1058 2
#line 223 "cdt.y"
{ add_cexpr(C_CPP); replace_mode(C_CPPTEXTLIST); ;
d1061 2
a1062 2
#line 224 "cdt.y"
{ pop_mode; ;
d1065 2
a1066 2
#line 225 "cdt.y"
{ add_cexpr(C_CPP); replace_mode(C_CPPTEXTLIST); ;
d1069 2
a1070 2
#line 226 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
d1073 2
a1074 2
#line 227 "cdt.y"
{ pop_mode; ;
d1076 2
a1077 2
case 33:
#line 258 "cdt.y"
d1080 2
a1081 2
case 34:
#line 259 "cdt.y"
d1084 2
a1085 2
case 35:
#line 260 "cdt.y"
d1088 2
a1089 2
case 36:
#line 261 "cdt.y"
d1092 2
a1093 2
case 37:
#line 262 "cdt.y"
d1096 2
a1097 2
case 38:
#line 263 "cdt.y"
d1100 2
a1101 2
case 40:
#line 265 "cdt.y"
d1104 2
a1105 2
case 42:
#line 270 "cdt.y"
d1108 2
a1109 2
case 75:
#line 312 "cdt.y"
d1112 2
a1113 2
case 77:
#line 314 "cdt.y"
d1116 2
a1117 2
case 83:
#line 325 "cdt.y"
d1120 2
a1121 2
case 101:
#line 355 "cdt.y"
d1124 2
a1125 2
case 102:
#line 356 "cdt.y"
d1128 2
a1129 2
case 103:
#line 357 "cdt.y"
d1132 2
a1133 2
case 104:
#line 358 "cdt.y"
d1136 2
a1137 2
case 105:
#line 359 "cdt.y"
d1140 2
a1141 2
case 106:
#line 360 "cdt.y"
d1144 2
a1145 2
case 116:
#line 375 "cdt.y"
d1148 2
a1149 2
case 132:
#line 400 "cdt.y"
d1350 1
a1350 1
#line 403 "cdt.y"
a1443 1
	LONG addx;
d1463 2
a1464 4
					addx = (tablen - (chrs % tablen));

					tabs  += addx;
					chrs  += addx;
d1469 1
a1469 1
			if(tabs > 0)
d1526 2
a1527 5
								{
									addx = (tablen - (chrs % tablen));

									chrs += addx;
								} else
a1551 2
							cparse->ActPtr = ptr;

d1554 1
a1554 3
								addx = (tablen - (chrs % tablen));

								chrs += addx;
d1557 2
d1649 1
d1658 11
d1677 1
a1677 1
				if(*ptr == 'x')
d1688 2
a1690 1
				cparse->Chars += (ptr - name);
d1706 2
@


39.15
log
@*** empty log	message	***
@
text
@d14 62
a75 61
#define  T_INCLUDE   258
#define  T_DEFINE 259
#define  T_UNDEF  260
#define  T_PRAGMA 261
#define  T_LINE   262
#define  T_ERROR  263
#define  T_IF  264
#define  T_IFDEF  265
#define  T_IFNDEF 266
#define  T_ELIF   267
#define  T_ENDIF  268
#define  T_AUTO   269
#define  T_EXTERN 270
#define  T_REGISTER  271
#define  T_STATIC 272
#define  T_CHAR   273
#define  T_SHORT  274
#define  T_INT 275
#define  T_LONG   276
#define  T_BOOL   277
#define  T_SIGNED 278
#define  T_UNSIGNED  279
#define  T_FLOAT  280
#define  T_DOUBLE 281
#define  T_VOID   282
#define  T_USERTYPE  283
#define  T_TEMPLATE  284
#define  T_SWITCH 285
#define  T_CASE   286
#define  T_BREAK  287
#define  T_DEFAULT   288
#define  T_ELSE   289
#define  T_FOR 290
#define  T_DO  291
#define  T_WHILE  292
#define  T_CONTINUE  293
#define  T_CONST  294
#define  T_VOLATILE  295
#define  T_GOTO   296
#define  T_RETURN 297
#define  T_STRUCT 298
#define  T_UNION  299
#define  T_ENUM   300
#define  T_TYPEDEF   301
#define  T_SIZEOF 302
#define  T_CLASS  303
#define  T_PUBLIC 304
#define  T_PRIVATE   305
#define  T_PROTECTED 306
#define  T_VIRTUAL   307
#define  T_FRIEND 308
#define  T_NEW 309
#define  T_DELETE 310
#define  T_OPERATOR  311
#define  T_TRY 312
#define  T_CATCH  313
#define  T_THROW  314
#define  T_INLINE 315
#define  T_ID  316
#define  T_CHR 317
#define  T_NUMBER 318
d82 1
a82 1
** $VER: cdt.y 39.13 (09.07.95)
d93 1
d240 8
a247 8
	 {
		int timestamp;
		int first_line;
		int first_column;
		int last_line;
		int last_column;
		char *text;
	}
d266 3
a268 3
#define  YYFINAL     149
#define  YYFLAG      -32768
#define  YYNTBASE 69
d270 1
a270 1
#define YYTRANSLATE(x) ((unsigned)(x) <= 318 ? yytranslate[x] : 103)
d273 32
a304 32
	  2,     2,     2,     2,     2,     2,     2,     2,     2,    65,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,    66,    64,     2,     2,     2,    67,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,    68,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
	  2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
	  6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
	 16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
	 26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
	 36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
	 46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
	 56,    57,    58,    59,    60,    61,    62,    63
d309 14
a322 14
	  0,     2,     5,     6,    10,    12,    14,    16,    18,    20,
	 23,    24,    28,    29,    30,    36,    38,    40,    42,    44,
	 46,    48,    50,    52,    54,    56,    58,    59,    61,    62,
	 64,    66,    69,    71,    73,    75,    76,    81,    85,    87,
	 88,    93,    95,    97,    99,   101,   103,   105,   107,   109,
	111,   113,   115,   117,   119,   121,   123,   125,   127,   129,
	131,   133,   135,   137,   139,   141,   143,   145,   147,   149,
	151,   153,   155,   157,   158,   162,   163,   167,   169,   171,
	173,   174,   176,   178,   180,   182,   184,   186,   188,   190,
	192,   194,   196,   198,   200,   202,   204,   206,   208,   211,
	213,   215,   217,   221,   222,   223,   230,   231,   233,   235,
	237,   239,   241,   244,   245,   248,   250,   253,   254,   256,
	258,   260,   262,   264,   267,   269,   271,   273,   275,   277,
	279
d325 30
a354 29
static const short yyrhs[] = {    70,
	  0,    69,    70,     0,     0,    64,    71,    72,     0,    65,
	  0,    92,     0,    93,     0,    84,     0,    94,     0,    73,
	 65,     0,     0,    77,    74,    78,     0,     0,     0,     4,
	 75,    61,    76,    79,     0,     3,     0,     5,     0,     6,
	  0,     7,     0,     8,     0,     9,     0,    10,     0,    11,
	  0,    12,     0,    13,     0,    34,     0,     0,    94,     0,
	  0,    80,     0,    81,     0,    80,    81,     0,    61,     0,
	 62,     0,    63,     0,     0,    66,    82,   100,    66,     0,
	 67,    98,    67,     0,    64,     0,     0,    68,    65,    83,
	 79,     0,    85,     0,    86,     0,    39,     0,    40,     0,
	 30,     0,    31,     0,    32,     0,     9,     0,    34,     0,
	 35,     0,    36,     0,    37,     0,    38,     0,    42,     0,
	 33,     0,    41,     0,    46,     0,    47,     0,    49,     0,
	 50,     0,    51,     0,    29,     0,    52,     0,    53,     0,
	 54,     0,    55,     0,    56,     0,    57,     0,    58,     0,
	 59,     0,    60,     0,    87,     0,     0,    90,    88,    91,
	  0,     0,    45,    89,    91,     0,    43,     0,    44,     0,
	 48,     0,     0,    61,     0,    18,     0,    19,     0,    20,
	  0,    21,     0,    23,     0,    24,     0,    25,     0,    26,
	  0,    27,     0,    22,     0,    28,     0,    14,     0,    15,
	  0,    17,     0,    16,     0,    95,     0,    94,    95,     0,
	 61,     0,    62,     0,    63,     0,    67,    98,    67,     0,
	  0,     0,    66,    96,   100,    66,    97,    99,     0,     0,
	 61,     0,    62,     0,    63,     0,    66,     0,    64,     0,
	 68,   102,     0,     0,    68,    65,     0,   101,     0,   100,
	101,     0,     0,    61,     0,    62,     0,    63,     0,    67,
	  0,    64,     0,    68,   102,     0,    61,     0,    62,     0,
	 63,     0,    66,     0,    68,     0,    67,     0,    65,     0
d361 14
a374 14
	201,   203,   206,   209,   209,   210,   211,   212,   213,   216,
	220,   222,   223,   224,   225,   228,   230,   231,   232,   233,
	234,   235,   236,   237,   238,   239,   242,   243,   246,   247,
	250,   252,   255,   257,   258,   259,   260,   261,   262,   263,
	265,   267,   269,   272,   274,   275,   276,   277,   278,   279,
	280,   281,   282,   283,   284,   285,   286,   287,   288,   289,
	290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
	300,   301,   304,   308,   311,   311,   313,   315,   317,   318,
	321,   322,   325,   327,   328,   329,   330,   331,   332,   333,
	334,   335,   336,   339,   341,   342,   343,   346,   348,   351,
	353,   354,   355,   356,   357,   359,   361,   362,   363,   364,
	365,   366,   367,   371,   372,   375,   377,   381,   382,   383,
	384,   385,   386,   387,   390,   392,   393,   394,   395,   396,
	397
d383 7
a389 7
"T_STRUCT","T_UNION","T_ENUM","T_TYPEDEF","T_SIZEOF","T_CLASS","T_PUBLIC","T_PRIVATE",
"T_PROTECTED","T_VIRTUAL","T_FRIEND","T_NEW","T_DELETE","T_OPERATOR","T_TRY",
"T_CATCH","T_THROW","T_INLINE","T_ID","T_CHR","T_NUMBER","'#'","'\\n'","'\"'",
"'\\''","'\\\\'","input","statement","@@1","cpp","cppline","@@2","@@3","@@4","cppkeyword",
"cpptextlist","definelist","definetextlist","definetext","@@5","@@6","keywords",
"keywordsincomplete","keywordscomplete","elaborated_type_specifier","@@7","@@8",
"class_key","elaborated_type_specifier_name","simple_type_name","storage_class",
d396 14
a409 14
	 69,    69,    71,    70,    70,    70,    70,    70,    70,    72,
	 74,    73,    75,    76,    73,    77,    77,    77,    77,    77,
	 77,    77,    77,    77,    77,    77,    78,    78,    79,    79,
	 80,    80,    81,    81,    81,    82,    81,    81,    81,    83,
	 81,    84,    84,    85,    85,    85,    85,    85,    85,    85,
	 85,    85,    85,    85,    85,    85,    85,    85,    85,    85,
	 85,    85,    85,    85,    85,    85,    85,    85,    85,    85,
	 85,    85,    86,    88,    87,    89,    87,    90,    90,    90,
	 91,    91,    92,    92,    92,    92,    92,    92,    92,    92,
	 92,    92,    92,    93,    93,    93,    93,    94,    94,    95,
	 95,    95,    95,    96,    97,    95,    98,    98,    98,    98,
	 98,    98,    98,    99,    99,   100,   100,   101,   101,   101,
	101,   101,   101,   101,   102,   102,   102,   102,   102,   102,
	102
d413 14
a426 14
	  1,     2,     0,     3,     1,     1,     1,     1,     1,     2,
	  0,     3,     0,     0,     5,     1,     1,     1,     1,     1,
	  1,     1,     1,     1,     1,     1,     0,     1,     0,     1,
	  1,     2,     1,     1,     1,     0,     4,     3,     1,     0,
	  4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
	  1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
	  1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
	  1,     1,     1,     0,     3,     0,     3,     1,     1,     1,
	  0,     1,     1,     1,     1,     1,     1,     1,     1,     1,
	  1,     1,     1,     1,     1,     1,     1,     1,     2,     1,
	  1,     1,     3,     0,     0,     6,     0,     1,     1,     1,
	  1,     1,     2,     0,     2,     1,     2,     0,     1,     1,
	  1,     1,     1,     2,     1,     1,     1,     1,     1,     1,
	  1
d430 15
a444 15
	 49,    94,    95,    97,    96,    83,    84,    85,    86,    92,
	 87,    88,    89,    90,    91,    93,    63,    46,    47,    48,
	 56,    50,    51,    52,    53,    54,    44,    45,    57,    55,
	 78,    79,    76,    58,    59,    80,    60,    61,    62,    64,
	 65,    66,    67,    68,    69,    70,    71,    72,   100,   101,
	102,     3,     5,   104,   107,     0,     1,     8,    42,    43,
	 73,    74,     6,     7,     9,    98,    81,     0,   118,   108,
	109,   110,   112,   111,     0,     0,     2,    81,    99,    82,
	 77,    16,    13,    17,    18,    19,    20,    21,    22,    23,
	 24,    25,    26,     4,     0,    11,   119,   120,   121,   123,
	122,     0,     0,   116,   125,   126,   127,   131,   128,   130,
	129,   113,   103,    75,     0,    10,    27,   124,   105,   117,
	 14,    12,    28,   114,    29,     0,   106,    33,    34,    35,
	 39,    36,   107,     0,    15,    30,    31,   115,   118,     0,
	 40,    32,     0,    38,    29,    37,    41,     0,     0
d447 5
a451 5
static const short yydefgoto[] = {    56,
	 57,    68,    94,    95,   117,   115,   125,    96,   122,   135,
	136,   137,   139,   145,    58,    59,    60,    61,    78,    67,
	 62,    81,    63,    64,    65,    66,    69,   124,    76,   127,
	103,   104,   112
d454 1
a454 1
static const short yypact[] = {    59,
d460 3
a462 3
-32768,-32768,-32768,-32768,   102,     0,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   118,-32768,   -57,   125,   110,-32768,
-32768,-32768,-32768,-32768,   -60,   -55,-32768,   -57,-32768,-32768,
d464 6
a469 6
-32768,-32768,-32768,-32768,   -52,-32768,-32768,-32768,-32768,-32768,
-32768,   -60,    78,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,-32768,   -51,-32768,   118,-32768,-32768,-32768,
-32768,-32768,   118,     2,    86,     6,-32768,-32768,-32768,-32768,
-32768,-32768,   102,     7,-32768,    86,-32768,-32768,   110,    76,
-32768,-32768,    94,-32768,    86,-32768,-32768,   151,-32768
d473 4
a476 4
	113,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    30,
-32768,    40,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,   104,-32768,-32768,    66,   -54,-32768,-32768,    53,-32768,
	 48,    24,    87
d480 1
a480 1
#define  YYLAST      189
d483 21
a503 20
static const short yytable[] = {   148,
	105,   106,   107,    80,   108,   109,   110,   111,     1,   121,
	 79,   113,   116,     2,     3,     4,     5,     6,     7,     8,
	  9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
	 19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
	 29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
	 39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
	 49,    50,    51,    52,    53,    54,    55,     1,    79,   126,
	138,   141,     2,     3,     4,     5,     6,     7,     8,     9,
	 10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
	 20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
	 30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
	 40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
	 50,    51,    52,    53,    54,    55,   120,    82,    83,    84,
	 85,    86,    87,    88,    89,    90,    91,    92,    97,    98,
	 99,   100,   144,   119,   101,   102,   128,   129,   130,   131,
	149,   132,   133,   134,    97,    98,    99,   100,    93,   146,
	101,   102,    70,    71,    72,    73,   120,    74,    77,    75,
	 97,    98,    99,   100,   147,   142,   101,   102,    49,    50,
	 51,   114,   123,    54,    55,   140,   143,     0,   118
d507 20
a526 19
	 61,    62,    63,    61,    65,    66,    67,    68,     9,    61,
	 65,    67,    65,    14,    15,    16,    17,    18,    19,    20,
	 21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
	 31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
	 41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
	 51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
	 61,    62,    63,    64,    65,    66,    67,     9,   123,    68,
	 65,    65,    14,    15,    16,    17,    18,    19,    20,    21,
	 22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
	 32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
	 42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
	 52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
	 62,    63,    64,    65,    66,    67,   103,     3,     4,     5,
	  6,     7,     8,     9,    10,    11,    12,    13,    61,    62,
	 63,    64,    67,    66,    67,    68,    61,    62,    63,    64,
	  0,    66,    67,    68,    61,    62,    63,    64,    34,    66,
	 67,    68,    61,    62,    63,    64,   143,    66,    56,    68,
	 61,    62,    63,    64,   145,   136,    67,    68,    61,    62,
	 63,    78,   117,    66,    67,   133,   139,    -1,   102
d1023 1
a1023 1
#line 207 "cdt.y"
d1025 1
a1025 1
	 break;}
d1027 1
a1027 1
#line 209 "cdt.y"
d1029 1
a1029 1
	 break;}
d1031 1
a1031 1
#line 210 "cdt.y"
d1033 1
a1033 1
	 break;}
d1035 1
a1035 1
#line 211 "cdt.y"
d1037 1
a1037 1
	 break;}
d1039 1
a1039 1
#line 217 "cdt.y"
d1041 1
a1041 1
	 break;}
d1043 1
a1043 1
#line 221 "cdt.y"
d1045 1
a1045 1
	 break;}
d1047 1
a1047 1
#line 222 "cdt.y"
d1049 1
a1049 1
	 break;}
d1051 1
a1051 1
#line 223 "cdt.y"
d1053 1
a1053 1
	 break;}
d1055 1
a1055 1
#line 224 "cdt.y"
d1057 1
a1057 1
	 break;}
d1059 1
a1059 1
#line 225 "cdt.y"
d1061 1
a1061 1
	 break;}
d1063 1
a1063 1
#line 256 "cdt.y"
d1065 1
a1065 1
	 break;}
d1067 1
a1067 1
#line 257 "cdt.y"
d1069 1
a1069 1
	 break;}
d1071 1
a1071 1
#line 258 "cdt.y"
d1073 1
a1073 1
	 break;}
d1075 1
a1075 1
#line 259 "cdt.y"
d1077 1
a1077 1
	 break;}
d1079 1
a1079 1
#line 260 "cdt.y"
d1081 1
a1081 1
	 break;}
d1083 1
a1083 1
#line 261 "cdt.y"
d1085 1
a1085 1
	 break;}
d1087 1
a1087 1
#line 263 "cdt.y"
d1089 1
a1089 1
	 break;}
d1091 1
a1091 1
#line 268 "cdt.y"
d1093 3
a1095 3
	 break;}
case 74:
#line 309 "cdt.y"
d1097 3
a1099 3
	 break;}
case 76:
#line 311 "cdt.y"
d1101 3
a1103 3
	 break;}
case 82:
#line 322 "cdt.y"
d1105 1
a1105 5
	 break;}
case 100:
#line 352 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr; ;
	 break;}
d1107 1
a1107 1
#line 353 "cdt.y"
d1109 1
a1109 1
	 break;}
d1111 5
a1115 1
#line 354 "cdt.y"
d1117 3
a1119 3
	 break;}
case 103:
#line 355 "cdt.y"
d1121 3
a1123 3
	 break;}
case 104:
#line 356 "cdt.y"
d1125 3
a1127 3
	 break;}
case 105:
#line 357 "cdt.y"
d1129 3
a1131 3
	 break;}
case 115:
#line 372 "cdt.y"
d1133 3
a1135 3
	 break;}
case 131:
#line 397 "cdt.y"
d1137 1
a1137 1
	 break;}
d1139 1
a1139 1
	/* the action file gets copied in in place of this dollarsign */
d1336 1
a1336 1
#line 400 "cdt.y"
d1641 10
d1710 2
a1711 1
	if((mem = AllocPooled(cparse->Data->cd_Pool,size + sizeof(struct cdtMem))))
d1714 1
a1714 1
		mem->Size = size + sizeof(struct cdtMem);
d1716 1
a1730 1
		mem--;
@


39.14
log
@*** empty log	message	***
@
text
@d14 61
a74 61
#define	T_INCLUDE	258
#define	T_DEFINE	259
#define	T_UNDEF	260
#define	T_PRAGMA	261
#define	T_LINE	262
#define	T_ERROR	263
#define	T_IF	264
#define	T_IFDEF	265
#define	T_IFNDEF	266
#define	T_ELIF	267
#define	T_ENDIF	268
#define	T_AUTO	269
#define	T_EXTERN	270
#define	T_REGISTER	271
#define	T_STATIC	272
#define	T_CHAR	273
#define	T_SHORT	274
#define	T_INT	275
#define	T_LONG	276
#define	T_BOOL	277
#define	T_SIGNED	278
#define	T_UNSIGNED	279
#define	T_FLOAT	280
#define	T_DOUBLE	281
#define	T_VOID	282
#define	T_USERTYPE	283
#define	T_TEMPLATE	284
#define	T_SWITCH	285
#define	T_CASE	286
#define	T_BREAK	287
#define	T_DEFAULT	288
#define	T_ELSE	289
#define	T_FOR	290
#define	T_DO	291
#define	T_WHILE	292
#define	T_CONTINUE	293
#define	T_CONST	294
#define	T_VOLATILE	295
#define	T_GOTO	296
#define	T_RETURN	297
#define	T_STRUCT	298
#define	T_UNION	299
#define	T_ENUM	300
#define	T_TYPEDEF	301
#define	T_SIZEOF	302
#define	T_CLASS	303
#define	T_PUBLIC	304
#define	T_PRIVATE	305
#define	T_PROTECTED	306
#define	T_VIRTUAL	307
#define	T_FRIEND	308
#define	T_NEW	309
#define	T_DELETE	310
#define	T_OPERATOR	311
#define	T_TRY	312
#define	T_CATCH	313
#define	T_THROW	314
#define	T_INLINE	315
#define	T_ID	316
#define	T_CHR	317
#define	T_NUMBER	318
d238 8
a245 8
    {
      int timestamp;
      int first_line;
      int first_column;
      int last_line;
      int last_column;
      char *text;
   }
d264 3
a266 3
#define	YYFINAL		149
#define	YYFLAG		-32768
#define	YYNTBASE	69
d271 32
a302 32
     2,     2,     2,     2,     2,     2,     2,     2,     2,    65,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,    66,    64,     2,     2,     2,    67,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,    68,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
     2,     2,     2,     2,     2,     1,     2,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
    16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
    26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
    36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
    46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
    56,    57,    58,    59,    60,    61,    62,    63
d307 14
a320 14
     0,     2,     5,     6,    10,    12,    14,    16,    18,    20,
    23,    24,    28,    29,    30,    36,    38,    40,    42,    44,
    46,    48,    50,    52,    54,    56,    58,    59,    61,    62,
    64,    66,    69,    71,    73,    75,    76,    81,    85,    87,
    88,    93,    95,    97,    99,   101,   103,   105,   107,   109,
   111,   113,   115,   117,   119,   121,   123,   125,   127,   129,
   131,   133,   135,   137,   139,   141,   143,   145,   147,   149,
   151,   153,   155,   157,   158,   162,   163,   167,   169,   171,
   173,   174,   176,   178,   180,   182,   184,   186,   188,   190,
   192,   194,   196,   198,   200,   202,   204,   206,   208,   211,
   213,   215,   217,   221,   222,   223,   230,   231,   233,   235,
   237,   239,   241,   244,   245,   248,   250,   253,   254,   256,
   258,   260,   262,   264,   267,   269,   271,   273,   275,   277,
   279
d324 28
a351 28
     0,    69,    70,     0,     0,    64,    71,    72,     0,    65,
     0,    92,     0,    93,     0,    84,     0,    94,     0,    73,
    65,     0,     0,    77,    74,    78,     0,     0,     0,     4,
    75,    61,    76,    79,     0,     3,     0,     5,     0,     6,
     0,     7,     0,     8,     0,     9,     0,    10,     0,    11,
     0,    12,     0,    13,     0,    34,     0,     0,    94,     0,
     0,    80,     0,    81,     0,    80,    81,     0,    61,     0,
    62,     0,    63,     0,     0,    66,    82,   100,    66,     0,
    67,    98,    67,     0,    64,     0,     0,    68,    65,    83,
    79,     0,    85,     0,    86,     0,    39,     0,    40,     0,
    30,     0,    31,     0,    32,     0,     9,     0,    34,     0,
    35,     0,    36,     0,    37,     0,    38,     0,    42,     0,
    33,     0,    41,     0,    46,     0,    47,     0,    49,     0,
    50,     0,    51,     0,    29,     0,    52,     0,    53,     0,
    54,     0,    55,     0,    56,     0,    57,     0,    58,     0,
    59,     0,    60,     0,    87,     0,     0,    90,    88,    91,
     0,     0,    45,    89,    91,     0,    43,     0,    44,     0,
    48,     0,     0,    61,     0,    18,     0,    19,     0,    20,
     0,    21,     0,    23,     0,    24,     0,    25,     0,    26,
     0,    27,     0,    22,     0,    28,     0,    14,     0,    15,
     0,    17,     0,    16,     0,    95,     0,    94,    95,     0,
    61,     0,    62,     0,    63,     0,    67,    98,    67,     0,
     0,     0,    66,    96,   100,    66,    97,    99,     0,     0,
    61,     0,    62,     0,    63,     0,    66,     0,    64,     0,
    68,   102,     0,     0,    68,    65,     0,   101,     0,   100,
   101,     0,     0,    61,     0,    62,     0,    63,     0,    67,
     0,    64,     0,    68,   102,     0,    61,     0,    62,     0,
    63,     0,    66,     0,    68,     0,    67,     0,    65,     0
d358 14
a371 14
   201,   203,   206,   209,   209,   210,   211,   212,   213,   216,
   220,   222,   223,   224,   225,   228,   230,   231,   232,   233,
   234,   235,   236,   237,   238,   239,   242,   243,   246,   247,
   250,   252,   255,   257,   258,   259,   260,   261,   262,   263,
   265,   267,   269,   272,   274,   275,   276,   277,   278,   279,
   280,   281,   282,   283,   284,   285,   286,   287,   288,   289,
   290,   291,   292,   293,   294,   295,   296,   297,   298,   299,
   300,   301,   304,   308,   311,   311,   313,   315,   317,   318,
   321,   322,   325,   327,   328,   329,   330,   331,   332,   333,
   334,   335,   336,   339,   341,   342,   343,   346,   348,   351,
   353,   354,   355,   356,   357,   359,   361,   362,   363,   364,
   365,   366,   367,   371,   372,   375,   377,   381,   382,   383,
   384,   385,   386,   387,   390,   392,   393,   394,   395,   396,
   397
d393 14
a406 14
    69,    69,    71,    70,    70,    70,    70,    70,    70,    72,
    74,    73,    75,    76,    73,    77,    77,    77,    77,    77,
    77,    77,    77,    77,    77,    77,    78,    78,    79,    79,
    80,    80,    81,    81,    81,    82,    81,    81,    81,    83,
    81,    84,    84,    85,    85,    85,    85,    85,    85,    85,
    85,    85,    85,    85,    85,    85,    85,    85,    85,    85,
    85,    85,    85,    85,    85,    85,    85,    85,    85,    85,
    85,    85,    86,    88,    87,    89,    87,    90,    90,    90,
    91,    91,    92,    92,    92,    92,    92,    92,    92,    92,
    92,    92,    92,    93,    93,    93,    93,    94,    94,    95,
    95,    95,    95,    96,    97,    95,    98,    98,    98,    98,
    98,    98,    98,    99,    99,   100,   100,   101,   101,   101,
   101,   101,   101,   101,   102,   102,   102,   102,   102,   102,
   102
d410 14
a423 14
     1,     2,     0,     3,     1,     1,     1,     1,     1,     2,
     0,     3,     0,     0,     5,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     0,     1,     0,     1,
     1,     2,     1,     1,     1,     0,     4,     3,     1,     0,
     4,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     0,     3,     0,     3,     1,     1,     1,
     0,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     1,     1,     2,     1,
     1,     1,     3,     0,     0,     6,     0,     1,     1,     1,
     1,     1,     2,     0,     2,     1,     2,     0,     1,     1,
     1,     1,     1,     2,     1,     1,     1,     1,     1,     1,
     1
d427 15
a441 15
    49,    94,    95,    97,    96,    83,    84,    85,    86,    92,
    87,    88,    89,    90,    91,    93,    63,    46,    47,    48,
    56,    50,    51,    52,    53,    54,    44,    45,    57,    55,
    78,    79,    76,    58,    59,    80,    60,    61,    62,    64,
    65,    66,    67,    68,    69,    70,    71,    72,   100,   101,
   102,     3,     5,   104,   107,     0,     1,     8,    42,    43,
    73,    74,     6,     7,     9,    98,    81,     0,   118,   108,
   109,   110,   112,   111,     0,     0,     2,    81,    99,    82,
    77,    16,    13,    17,    18,    19,    20,    21,    22,    23,
    24,    25,    26,     4,     0,    11,   119,   120,   121,   123,
   122,     0,     0,   116,   125,   126,   127,   131,   128,   130,
   129,   113,   103,    75,     0,    10,    27,   124,   105,   117,
    14,    12,    28,   114,    29,     0,   106,    33,    34,    35,
    39,    36,   107,     0,    15,    30,    31,   115,   118,     0,
    40,    32,     0,    38,    29,    37,    41,     0,     0
d445 4
a448 4
    57,    68,    94,    95,   117,   115,   125,    96,   122,   135,
   136,   137,   139,   145,    58,    59,    60,    61,    78,    67,
    62,    81,    63,    64,    65,    66,    69,   124,    76,   127,
   103,   104,   112
d470 1
a470 1
   113,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,    30,
d473 1
a473 1
    48,    24,    87
d477 1
a477 1
#define	YYLAST		189
d481 19
a499 19
   105,   106,   107,    80,   108,   109,   110,   111,     1,   121,
    79,   113,   116,     2,     3,     4,     5,     6,     7,     8,
     9,    10,    11,    12,    13,    14,    15,    16,    17,    18,
    19,    20,    21,    22,    23,    24,    25,    26,    27,    28,
    29,    30,    31,    32,    33,    34,    35,    36,    37,    38,
    39,    40,    41,    42,    43,    44,    45,    46,    47,    48,
    49,    50,    51,    52,    53,    54,    55,     1,    79,   126,
   138,   141,     2,     3,     4,     5,     6,     7,     8,     9,
    10,    11,    12,    13,    14,    15,    16,    17,    18,    19,
    20,    21,    22,    23,    24,    25,    26,    27,    28,    29,
    30,    31,    32,    33,    34,    35,    36,    37,    38,    39,
    40,    41,    42,    43,    44,    45,    46,    47,    48,    49,
    50,    51,    52,    53,    54,    55,   120,    82,    83,    84,
    85,    86,    87,    88,    89,    90,    91,    92,    97,    98,
    99,   100,   144,   119,   101,   102,   128,   129,   130,   131,
   149,   132,   133,   134,    97,    98,    99,   100,    93,   146,
   101,   102,    70,    71,    72,    73,   120,    74,    77,    75,
    97,    98,    99,   100,   147,   142,   101,   102,    49,    50,
    51,   114,   123,    54,    55,   140,   143,     0,   118
d503 19
a521 19
    61,    62,    63,    61,    65,    66,    67,    68,     9,    61,
    65,    67,    65,    14,    15,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
    41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
    51,    52,    53,    54,    55,    56,    57,    58,    59,    60,
    61,    62,    63,    64,    65,    66,    67,     9,   123,    68,
    65,    65,    14,    15,    16,    17,    18,    19,    20,    21,
    22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
    32,    33,    34,    35,    36,    37,    38,    39,    40,    41,
    42,    43,    44,    45,    46,    47,    48,    49,    50,    51,
    52,    53,    54,    55,    56,    57,    58,    59,    60,    61,
    62,    63,    64,    65,    66,    67,   103,     3,     4,     5,
     6,     7,     8,     9,    10,    11,    12,    13,    61,    62,
    63,    64,    67,    66,    67,    68,    61,    62,    63,    64,
     0,    66,    67,    68,    61,    62,    63,    64,    34,    66,
    67,    68,    61,    62,    63,    64,   143,    66,    56,    68,
    61,    62,    63,    64,   145,   136,    67,    68,    61,    62,
    63,    78,   117,    66,    67,   133,   139,    -1,   102
d1020 1
a1020 1
    break;}
d1024 1
a1024 1
    break;}
d1028 1
a1028 1
    break;}
d1032 1
a1032 1
    break;}
d1036 1
a1036 1
    break;}
d1040 1
a1040 1
    break;}
d1044 1
a1044 1
    break;}
d1048 1
a1048 1
    break;}
d1052 1
a1052 1
    break;}
d1056 1
a1056 1
    break;}
d1060 1
a1060 1
    break;}
d1064 1
a1064 1
    break;}
d1068 1
a1068 1
    break;}
d1072 1
a1072 1
    break;}
d1076 1
a1076 1
    break;}
d1080 1
a1080 1
    break;}
d1084 1
a1084 1
    break;}
d1088 1
a1088 1
    break;}
d1092 1
a1092 1
    break;}
d1096 1
a1096 1
    break;}
d1100 1
a1100 1
    break;}
d1104 1
a1104 1
    break;}
d1108 1
a1108 1
    break;}
d1112 1
a1112 1
    break;}
d1116 1
a1116 1
    break;}
d1120 1
a1120 1
    break;}
d1124 1
a1124 1
    break;}
d1128 1
a1128 1
    break;}
d1132 1
a1132 1
    break;}
d1134 1
a1134 1
   /* the action file gets copied in in place of this dollarsign */
@


39.13
log
@*** empty log	message	***
@
text
@d2 1
a2 1
/*  A Bison parser, made from cdt.y with Bison version GNU Bison version 1.22
d33 42
a74 40
#define	T_SIGNED	277
#define	T_UNSIGNED	278
#define	T_FLOAT	279
#define	T_DOUBLE	280
#define	T_VOID	281
#define	T_USERTYPE	282
#define	T_SWITCH	283
#define	T_CASE	284
#define	T_BREAK	285
#define	T_DEFAULT	286
#define	T_ELSE	287
#define	T_FOR	288
#define	T_DO	289
#define	T_WHILE	290
#define	T_CONTINUE	291
#define	T_CONST	292
#define	T_VOLATILE	293
#define	T_GOTO	294
#define	T_RETURN	295
#define	T_STRUCT	296
#define	T_UNION	297
#define	T_ENUM	298
#define	T_TYPEDEF	299
#define	T_SIZEOF	300
#define	T_CLASS	301
#define	T_PUBLIC	302
#define	T_PRIVATE	303
#define	T_PROTECTED	304
#define	T_VIRTUAL	305
#define	T_FRIEND	306
#define	T_NEW	307
#define	T_DELETE	308
#define	T_OPERATOR	309
#define	T_TRY	310
#define	T_CATCH	311
#define	T_THROW	312
#define	T_INLINE	313
#define	T_ID	314
#define	T_CHR	315
#define	T_NUMBER	316
d81 1
a81 1
** $VER: cdt.y 39.12 (04.06.95)
d92 1
d109 1
a109 1
/*FS*/ void add_line(struct ClassBase *cb,struct CParse *cparse,ULONG index,UWORD flags)
d111 1
a111 1
	struct Style *style = &cparse->Data->cd_CStyle[index];
d114 3
a116 2
	/* ignore segments , which are marked as text and no tabs are found ! */
	if(!(style->Style == ~0 && index != C_STANDARD && cparse->XOffsetAdd == 0) || (flags & LNF_LF))
d118 3
a120 4
		if((line = AllocPooled(cparse->Data->cd_Pool,sizeof(struct Line))))
		{
			struct Line *tabline = NULL;
			STRPTR ptr = cparse->SegPtr;
a121 3
			if((style->Style & FSF_UNDERLINED) || cparse->XOffsetAdd > 0)
			{
				ULONG x = cparse->XOffsetAdd;
d123 3
a125 5
				while(*ptr == ' ' || *ptr == '\t')
				{
					if(*ptr++ == ' ')
						x++;
				}
d127 2
a128 15
				if((tabline = AllocPooled(cparse->Data->cd_Pool,sizeof(struct Line))))
				{
					tabline->ln_Text    = cparse->Data->cd_TabBuffer;
					tabline->ln_TextLen = x;
					tabline->ln_XOffset = cparse->XOffset;
					tabline->ln_YOffset = cparse->YOffset;

					x *= cparse->TabWidth;

					tabline->ln_Width   = x;
					tabline->ln_Height  = cparse->RPort->TxHeight;
					tabline->ln_Flags   = 0;
					tabline->ln_FgPen   = style->FgPen;
					tabline->ln_BgPen   = style->BgPen;
					tabline->ln_Style   = FS_NORMAL;
d130 5
a134 1
					cparse->XOffset += x;
d136 4
a139 3
					AddTail(cparse->LineList,(struct Node *) tabline);
				}
			}
d141 14
a154 1
			line->ln_Text    = ptr;
d156 4
a159 7
			if(ptr < cparse->ActPtr)
				line->ln_TextLen = cparse->ActPtr - ptr;
			else
			{
				line->ln_TextLen = 0;
				line->ln_Text    = NULL;
			}
d161 5
a165 2
			if((flags & LNF_LF) && line->ln_TextLen > 0)
				line->ln_TextLen--;
d167 11
a177 11
			line->ln_XOffset  = cparse->XOffset;
			line->ln_YOffset  = cparse->YOffset;
			line->ln_Width    = TextLength(cparse->RPort,line->ln_Text,line->ln_TextLen);
			line->ln_Height   = cparse->RPort->TxHeight;
			line->ln_Flags    = flags;
			line->ln_FgPen    = style->FgPen;
			line->ln_BgPen    = style->BgPen;
			if(style->Style != ~0)
				line->ln_Style = style->Style;
			else
				line->ln_Style = FS_NORMAL;
d179 4
a182 4
			if(flags & LNF_LF)
			{
				if(cparse->XOffset + line->ln_Width > cparse->MaxWidth)
					cparse->MaxWidth = cparse->XOffset + line->ln_Width;
d184 7
a190 5
				cparse->YOffset += line->ln_Height;
				cparse->XOffset  = 0;
			} else
			{
				cparse->XOffset += line->ln_Width;
d192 3
a194 9
				D({
					STRPTR ptr = &line->ln_Text[line->ln_TextLen];
					UBYTE help = *ptr;

					*ptr = '\0';
					bug("text : %s\n",line->ln_Text);
					*ptr = help;
				  });
			}
d196 3
a198 2
			cparse->XOffsetAdd = 0;
			cparse->SegPtr  = cparse->ActPtr;
d200 1
a200 1
			AddTail(cparse->LineList,(struct Node *) line);
d202 5
a206 1
	}
d210 1
a210 7
/*FS*/ void add_cexpr(struct ClassBase *cb,struct CParse *cparse,ULONG index,BOOL lf)
{
	if(cparse->TxtPtr > cparse->SegPtr && *cparse->SegPtr != '\n')
	{
		STRPTR actptr = cparse->ActPtr;
		ULONG index = (cparse->Mode < C_MAX) ? cparse->Mode : C_STANDARD;
		ULONG x = cparse->XOffsetAdd;
d212 1
a212 2
		cparse->XOffsetAdd = 0;
		cparse->ActPtr = cparse->TxtPtr;
d214 3
a216 1
		add_line(cb,cparse,index,0);
d218 2
a219 4
		cparse->XOffsetAdd = x;
		cparse->SegPtr = cparse->ActPtr;
		cparse->ActPtr = actptr;
	}
d221 4
d226 2
a227 1
	add_line(cb,cparse,index,lf);
d229 4
a232 3
	cparse->TxtPtr = cparse->ActPtr;
}
/*FE*/
a257 1
#ifndef const
a260 1
#endif
d264 1
a264 1
#define	YYFINAL		147
d266 1
a266 1
#define	YYNTBASE	67
d268 1
a268 1
#define YYTRANSLATE(x) ((unsigned)(x) <= 316 ? yytranslate[x] : 101)
d271 1
a271 1
     2,     2,     2,     2,     2,     2,     2,     2,     2,    63,
d274 1
a274 1
     2,     2,     2,    64,    62,     2,     2,     2,    65,     2,
d280 1
a280 1
     2,    66,     2,     2,     2,     2,     2,     2,     2,     2,
d302 1
a302 1
    56,    57,    58,    59,    60,    61
d308 3
a310 3
    23,    24,    28,    30,    32,    34,    36,    38,    40,    42,
    44,    46,    48,    50,    52,    53,    55,    56,    57,    63,
    64,    66,    68,    71,    73,    75,    77,    81,    85,    87,
d314 7
a320 6
   151,   153,   155,   156,   160,   161,   165,   167,   169,   171,
   172,   174,   176,   178,   180,   182,   184,   186,   188,   190,
   192,   194,   196,   198,   200,   202,   204,   207,   209,   211,
   213,   217,   218,   219,   226,   227,   229,   231,   233,   235,
   237,   240,   241,   244,   246,   249,   250,   252,   254,   256,
   258,   260,   263,   265,   267,   269,   271,   273,   275
d323 29
a351 29
static const short yyrhs[] = {    68,
     0,    67,    68,     0,     0,    62,    69,    70,     0,    63,
     0,    90,     0,    91,     0,    82,     0,    92,     0,    71,
    63,     0,     0,    73,    72,    74,     0,    75,     0,     3,
     0,     5,     0,     6,     0,     7,     0,     8,     0,     9,
     0,    10,     0,    11,     0,    12,     0,    13,     0,    32,
     0,     0,    92,     0,     0,     0,     4,    76,    59,    77,
    78,     0,     0,    79,     0,    80,     0,    79,    80,     0,
    59,     0,    60,     0,    61,     0,    64,    98,    64,     0,
    65,    96,    65,     0,    62,     0,     0,    66,    63,    81,
    78,     0,    83,     0,    84,     0,    37,     0,    38,     0,
    28,     0,    29,     0,    30,     0,     9,     0,    32,     0,
    33,     0,    34,     0,    35,     0,    36,     0,    40,     0,
    31,     0,    39,     0,    44,     0,    45,     0,    47,     0,
    48,     0,    49,     0,    50,     0,    51,     0,    52,     0,
    53,     0,    54,     0,    55,     0,    56,     0,    57,     0,
    58,     0,    85,     0,     0,    88,    86,    89,     0,     0,
    43,    87,    89,     0,    41,     0,    42,     0,    46,     0,
     0,    59,     0,    18,     0,    19,     0,    20,     0,    21,
     0,    22,     0,    23,     0,    24,     0,    25,     0,    26,
     0,    27,     0,    14,     0,    15,     0,    17,     0,    16,
     0,    93,     0,    92,    93,     0,    59,     0,    60,     0,
    61,     0,    65,    96,    65,     0,     0,     0,    64,    94,
    98,    64,    95,    97,     0,     0,    59,     0,    60,     0,
    61,     0,    64,     0,    62,     0,    66,   100,     0,     0,
    66,    63,     0,    99,     0,    98,    99,     0,     0,    59,
     0,    60,     0,    61,     0,    65,     0,    62,     0,    66,
   100,     0,    59,     0,    60,     0,    61,     0,    64,     0,
    66,     0,    65,     0,    63,     0
d358 14
a371 13
   199,   200,   203,   205,   206,   207,   208,   209,   210,   213,
   217,   220,   220,   223,   225,   226,   227,   228,   229,   230,
   231,   232,   233,   234,   237,   238,   241,   243,   245,   247,
   248,   251,   254,   258,   260,   261,   262,   263,   264,   265,
   267,   271,   273,   275,   277,   278,   279,   280,   281,   282,
   283,   284,   285,   286,   287,   288,   289,   290,   291,   292,
   293,   294,   295,   296,   297,   298,   299,   300,   301,   302,
   303,   306,   310,   313,   313,   315,   317,   319,   320,   323,
   324,   327,   329,   330,   331,   332,   333,   334,   335,   336,
   337,   340,   342,   343,   344,   347,   350,   354,   356,   357,
   358,   361,   364,   367,   369,   370,   371,   372,   373,   374,
   375,   379,   380,   383,   385,   389,   390,   391,   392,   393,
   394,   395,   398,   400,   401,   402,   403,   404,   405
d374 1
a374 1
static const char * const yytname[] = {   "$","error","$illegal.","T_INCLUDE",
d377 12
a388 11
"T_INT","T_LONG","T_SIGNED","T_UNSIGNED","T_FLOAT","T_DOUBLE","T_VOID","T_USERTYPE",
"T_SWITCH","T_CASE","T_BREAK","T_DEFAULT","T_ELSE","T_FOR","T_DO","T_WHILE",
"T_CONTINUE","T_CONST","T_VOLATILE","T_GOTO","T_RETURN","T_STRUCT","T_UNION",
"T_ENUM","T_TYPEDEF","T_SIZEOF","T_CLASS","T_PUBLIC","T_PRIVATE","T_PROTECTED",
"T_VIRTUAL","T_FRIEND","T_NEW","T_DELETE","T_OPERATOR","T_TRY","T_CATCH","T_THROW",
"T_INLINE","T_ID","T_CHR","T_NUMBER","'#'","'\\n'","'\"'","'\\''","'\\\\'","input",
"statement","@@1","cpp","cppline","@@2","cppkeyword","cpptextlist","define","@@3",
"@@4","definelist","definetextlist","definetext","@@5","keywords","keywordsincomplete",
"keywordscomplete","elaborated_type_specifier","@@6","@@7","class_key","elaborated_type_specifier_name",
"simple_type_name","storage_class","textlist","text","@@8","@@9","char","stringend",
"stringinner","stringtoken","stringescaped",""
d393 14
a406 13
    67,    67,    69,    68,    68,    68,    68,    68,    68,    70,
    72,    71,    71,    73,    73,    73,    73,    73,    73,    73,
    73,    73,    73,    73,    74,    74,    76,    77,    75,    78,
    78,    79,    79,    80,    80,    80,    80,    80,    80,    81,
    80,    82,    82,    83,    83,    83,    83,    83,    83,    83,
    83,    83,    83,    83,    83,    83,    83,    83,    83,    83,
    83,    83,    83,    83,    83,    83,    83,    83,    83,    83,
    83,    84,    86,    85,    87,    85,    88,    88,    88,    89,
    89,    90,    90,    90,    90,    90,    90,    90,    90,    90,
    90,    91,    91,    91,    91,    92,    92,    93,    93,    93,
    93,    94,    95,    93,    96,    96,    96,    96,    96,    96,
    96,    97,    97,    98,    98,    99,    99,    99,    99,    99,
    99,    99,   100,   100,   100,   100,   100,   100,   100
d411 3
a413 3
     0,     3,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     0,     1,     0,     0,     5,     0,
     1,     1,     2,     1,     1,     1,     3,     3,     1,     0,
d417 7
a423 6
     1,     1,     0,     3,     0,     3,     1,     1,     1,     0,
     1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
     1,     1,     1,     1,     1,     1,     2,     1,     1,     1,
     3,     0,     0,     6,     0,     1,     1,     1,     1,     1,
     2,     0,     2,     1,     2,     0,     1,     1,     1,     1,
     1,     2,     1,     1,     1,     1,     1,     1,     1
d427 15
a441 15
    49,    92,    93,    95,    94,    82,    83,    84,    85,    86,
    87,    88,    89,    90,    91,    46,    47,    48,    56,    50,
    51,    52,    53,    54,    44,    45,    57,    55,    77,    78,
    75,    58,    59,    79,    60,    61,    62,    63,    64,    65,
    66,    67,    68,    69,    70,    71,    98,    99,   100,     3,
     5,   102,   105,     0,     1,     8,    42,    43,    72,    73,
     6,     7,     9,    96,    80,     0,   116,   106,   107,   108,
   110,   109,     0,     0,     2,    80,    97,    81,    76,    14,
    27,    15,    16,    17,    18,    19,    20,    21,    22,    23,
    24,     4,     0,    11,    13,   117,   118,   119,   121,   120,
     0,     0,   114,   123,   124,   125,   129,   126,   128,   127,
   111,   101,    74,     0,    10,    25,   122,   103,   115,    28,
    12,    26,   112,    30,     0,   104,    34,    35,    36,    39,
   116,   105,     0,    29,    31,    32,   113,     0,     0,    40,
    33,    37,    38,    30,    41,     0,     0
d444 5
a448 5
static const short yydefgoto[] = {    54,
    55,    66,    92,    93,   116,    94,   121,    95,   114,   124,
   134,   135,   136,   144,    56,    57,    58,    59,    76,    65,
    60,    79,    61,    62,    63,    64,    67,   123,    74,   126,
   102,   103,   111
d451 1
a451 1
static const short yypact[] = {    58,
d457 3
a459 3
-32768,-32768,   -58,     0,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,   121,-32768,   -54,   122,   113,-32768,-32768,-32768,
-32768,-32768,    77,   -55,-32768,   -54,-32768,-32768,-32768,-32768,
d461 6
a466 6
-32768,-32768,   -52,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
    77,    85,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,-32768,-32768,   -47,-32768,   121,-32768,-32768,-32768,-32768,
-32768,   121,   -53,    97,     5,-32768,-32768,-32768,-32768,-32768,
   113,   -58,     6,-32768,    97,-32768,-32768,   105,    74,-32768,
-32768,-32768,-32768,    97,-32768,    70,-32768
d470 4
a473 4
    17,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
     4,-32768,    18,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
-32768,    76,-32768,-32768,    39,   -56,-32768,-32768,    36,-32768,
    45,    22,    82
d477 1
a477 1
#define	YYLAST		186
d480 3
a482 3
static const short yytable[] = {   146,
    68,    69,    70,    71,    78,    72,    77,    73,     1,   112,
   115,   120,   125,     2,     3,     4,     5,     6,     7,     8,
d487 13
a499 13
    49,    50,    51,    52,    53,    77,     1,   137,   140,   147,
    75,     2,     3,     4,     5,     6,     7,     8,     9,    10,
    11,    12,    13,    14,    15,    16,    17,    18,    19,    20,
    21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
    31,    32,    33,    34,    35,    36,    37,    38,    39,    40,
    41,    42,    43,    44,    45,    46,    47,    48,    49,    50,
    51,    52,    53,   119,    80,    81,    82,    83,    84,    85,
    86,    87,    88,    89,    90,   104,   105,   106,   143,   107,
   108,   109,   110,    96,    97,    98,    99,   145,   118,   100,
   101,   113,   141,    91,   122,   127,   128,   129,   130,   119,
   131,   132,   133,    96,    97,    98,    99,   139,   142,   100,
   101,    96,    97,    98,    99,   138,     0,   100,   101,    47,
    48,    49,   117,     0,    52,    53
d503 2
a504 2
    59,    60,    61,    62,    59,    64,    63,    66,     9,    65,
    63,    59,    66,    14,    15,    16,    17,    18,    19,    20,
d509 13
a521 13
    61,    62,    63,    64,    65,   122,     9,    63,    63,     0,
    54,    14,    15,    16,    17,    18,    19,    20,    21,    22,
    23,    24,    25,    26,    27,    28,    29,    30,    31,    32,
    33,    34,    35,    36,    37,    38,    39,    40,    41,    42,
    43,    44,    45,    46,    47,    48,    49,    50,    51,    52,
    53,    54,    55,    56,    57,    58,    59,    60,    61,    62,
    63,    64,    65,   102,     3,     4,     5,     6,     7,     8,
     9,    10,    11,    12,    13,    59,    60,    61,    65,    63,
    64,    65,    66,    59,    60,    61,    62,   144,    64,    65,
    66,    76,   135,    32,   116,    59,    60,    61,    62,   138,
    64,    65,    66,    59,    60,    61,    62,   132,    64,    65,
    66,    59,    60,    61,    62,   131,    -1,    65,    66,    59,
    60,    61,   101,    -1,    64,    65
d526 1
a526 1
#line 3 "/gnu/lib/bison.simple"
d529 1
a529 1
	Copyright (C) 1984, 1989, 1990 Bob Corbett and Richard Stallman
d533 1
a533 1
	the Free Software Foundation; either version 1, or (at your option)
d545 4
a548 2
/* Added for Amiga SASC , and replaced fprintf(stderr,...) to printf(...)
	Stefan Ruppert */
d554 2
a555 2
#ifdef printf
#undef printf
d557 1
a557 2
#define printf Printf
static void __yy_bcopy (char *from,char *to,int count);
a559 1

d632 3
d636 4
d643 1
d652 1
a652 1
										  /*  lookahead symbol                    */
d656 1
a656 1
										  /*  symbol                              */
d685 4
d691 1
a691 1
int yyparse(struct ClassBase *cb,struct CParse *cparse);
d695 1
a695 1
#define __yy_bcopy(FROM,TO,COUNT)       __builtin_memcpy(TO,FROM,COUNT)
d702 1
a702 1
__yy_bcopy (from, to, count)
d720 1
a720 1
__yy_bcopy (char *from, char *to, int count)
d733 2
a734 1
#line 184 "/gnu/lib/bison.simple"
d736 1
a736 1
yyparse(struct ClassBase *cb,struct CParse *cparse)
d773 2
a774 2
										  /*  semantic values from the action     */
										  /*  routines                            */
d780 1
a780 1
	 printf( "Starting parse\n");
d821 1
a821 1
			the data in use in that stack, in bytes.  */
d824 1
a824 1
			but that might be undefined if yyoverflow is a macro.  */
d826 4
a829 4
					  &yyss1, size * sizeof (*yyssp),
					  &yyvs1, size * sizeof (*yyvsp),
					  &yyls1, size * sizeof (*yylsp),
					  &yystacksize);
d832 3
a834 3
					  &yyss1, size * sizeof (*yyssp),
					  &yyvs1, size * sizeof (*yyvsp),
					  &yystacksize);
d844 4
a847 4
		  {
			 yyerror("parser stack overflow");
			 return 2;
		  }
d850 1
a850 1
		  yystacksize = YYMAXDEPTH;
d852 1
a852 1
		__yy_bcopy ((char *)yyss1, (char *)yyss, size * sizeof (*yyssp));
d854 1
a854 1
		__yy_bcopy ((char *)yyvs1, (char *)yyvs, size * sizeof (*yyvsp));
d857 1
a857 1
		__yy_bcopy ((char *)yyls1, (char *)yyls, size * sizeof (*yylsp));
d869 1
a869 1
		  printf( "Stack size increased to %ld\n", yystacksize);
d873 1
a873 1
		  YYABORT;
d878 1
a878 1
	  printf( "Entering state %ld\n", yystate);
d903 1
a903 1
		  printf( "Reading a token: ");
d905 1
a905 1
		yychar = yylex(&yylval,cb,cparse);
d917 1
a917 1
		  printf( "Now at end of input.\n");
d926 4
a929 4
		  {
			 printf ("Next token is %ld (%s", yychar, yytname[yychar1]);
			 /* Give the individual parser a way to print the precise meaning
				 of a token, for further debugging info.  */
d931 1
a931 1
			 YYPRINT (yychar, yylval);
d933 2
a934 2
			 printf (")\n");
		  }
d954 1
a954 1
		  goto yyerrlab;
d968 1
a968 1
	 printf( "Shifting token %ld (%s), ", yychar, yytname[yychar1]);
d1004 2
a1005 2
		printf ("Reducing via rule %ld (line %ld), ",
					yyn, yyrline[yyn]);
d1009 1
a1009 1
		  printf ("%s ", yytname[yyrhs[i]]);
d1018 2
a1019 6
#line 204 "cdt.y"
{ cparse->Mode = C_CPP; ;
    break;}
case 4:
#line 205 "cdt.y"
{ cparse->Mode = C_STANDARD; ;
d1022 2
a1023 2
#line 206 "cdt.y"
{ add_cexpr(cb,cparse,C_STANDARD,LNF_LF); ;
d1026 2
a1027 2
#line 207 "cdt.y"
{ add_cexpr(cb,cparse,C_TYPES,0);   ;
d1030 2
a1031 2
#line 208 "cdt.y"
{ add_cexpr(cb,cparse,C_STORAGE,0); ;
d1034 2
a1035 2
#line 214 "cdt.y"
{ add_cexpr(cb,cparse,C_STANDARD,LNF_LF); ;
d1038 2
a1039 2
#line 218 "cdt.y"
{ add_cexpr(cb,cparse,C_CPP,0); cparse->Mode = C_CPPTEXTLIST; ;
d1041 15
a1055 12
case 27:
#line 242 "cdt.y"
{ add_cexpr(cb,cparse,C_CPP,0); cparse->Mode = C_CPPTEXTLIST; cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 28:
#line 243 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr;  ;
    break;}
case 32:
#line 252 "cdt.y"
{ if(cparse->XOffsetAdd) add_cexpr(cb,cparse,C_STANDARD,0);
												cparse->TxtPtr = cparse->ActPtr;   ;
d1058 10
a1067 3
#line 254 "cdt.y"
{ if(cparse->XOffsetAdd) add_cexpr(cb,cparse,C_STANDARD,0);
												cparse->TxtPtr = cparse->ActPtr;   ;
d1070 2
a1071 2
#line 261 "cdt.y"
{ add_cexpr(cb,cparse,C_NUMBER,0);   ;
d1074 2
a1075 2
#line 262 "cdt.y"
{ add_cexpr(cb,cparse,C_STRING,0);   ;
d1078 2
a1079 6
#line 263 "cdt.y"
{ add_cexpr(cb,cparse,C_STRING,0);   ;
    break;}
case 39:
#line 264 "cdt.y"
{ cparse->TxtPtr = cparse->ActPtr;   ;
d1082 2
a1083 2
#line 265 "cdt.y"
{ add_cexpr(cb,cparse,C_STANDARD,LNF_LF); ;
d1086 2
a1087 2
#line 272 "cdt.y"
{ add_cexpr(cb,cparse,C_KEYWORD,0); ;
d1089 5
a1093 1
case 73:
d1095 1
a1095 19
{ add_cexpr(cb,cparse,C_KEYWORD,0); ;
    break;}
case 75:
#line 313 "cdt.y"
{ add_cexpr(cb,cparse,C_KEYWORD,0); ;
    break;}
case 81:
#line 324 "cdt.y"
{ add_cexpr(cb,cparse,C_TYPENAME,0); ;
    break;}
case 96:
#line 348 "cdt.y"
{ if(cparse->XOffsetAdd) add_cexpr(cb,cparse,C_STANDARD,0);
											  cparse->TxtPtr = cparse->ActPtr; ;
    break;}
case 97:
#line 350 "cdt.y"
{ if(cparse->XOffsetAdd)  add_cexpr(cb,cparse,C_STANDARD,0);
											  cparse->TxtPtr = cparse->ActPtr; ;
d1097 3
a1099 3
case 98:
#line 355 "cdt.y"
{  ;
d1102 2
a1103 2
#line 357 "cdt.y"
{ add_cexpr(cb,cparse,C_NUMBER,0); ;
d1106 2
a1107 2
#line 360 "cdt.y"
{ add_cexpr(cb,cparse,C_STRING,0); ;
d1110 2
a1111 3
#line 361 "cdt.y"
{ cparse->ActPtr--;add_cexpr(cb,cparse,C_STANDARD,0);
											  cparse->ActPtr++;cparse->Mode = C_STRING;         ;
d1114 18
a1131 11
#line 364 "cdt.y"
{ add_cexpr(cb,cparse,C_STRING,0);
											  cparse->Mode = C_STANDARD; ;
    break;}
case 113:
#line 380 "cdt.y"
{ add_cexpr(cb,cparse,C_STANDARD,LNF_LF); ;
    break;}
case 129:
#line 405 "cdt.y"
{ add_cexpr(cb,cparse,C_STRING,LNF_LF); ;
d1135 1
a1135 1
#line 465 "/gnu/lib/bison.simple"
d1149 1
a1149 1
		  printf (" %ld", *++ssp1);
d1199 22
a1220 13
		  {
			 int size = 0;
			 char *msg;
			 int x, count;

			 count = 0;
			 /* Start X at -yyn if nec to avoid negative indexes in yycheck.  */
			 for (x = (yyn < 0 ? -yyn : 0);
					x < (sizeof(yytname) / sizeof(char *)); x++)
				if (yycheck[x + yyn] == x)
				  size += strlen(yytname[x]) + 15, count++;
			 msg = (char *) malloc(size + 15);
			 if (msg != 0)
d1222 4
a1225 17
				  strcpy(msg, "parse error");

				  if (count < 5)
					 {
						count = 0;
						for (x = (yyn < 0 ? -yyn : 0);
							  x < (sizeof(yytname) / sizeof(char *)); x++)
						  if (yycheck[x + yyn] == x)
							 {
								strcat(msg, count == 0 ? ", expecting `" : " or `");
								strcat(msg, yytname[x]);
								strcat(msg, "'");
								count++;
							 }
					 }
				  yyerror(msg);
				  free(msg);
d1227 7
a1233 3
			 else
				yyerror ("parse error; also virtual memory exceeded");
		  }
d1236 1
a1236 1
		  cdtparse_parseerror(cb,cparse);
d1248 1
a1248 1
		  YYABORT;
d1252 1
a1252 1
		  printf( "Discarding token %ld (%s).\n", yychar, yytname[yychar1]);
d1289 1
a1289 1
		  printf (" %ld", *++ssp1);
d1308 1
a1308 1
		  goto yyerrpop;
d1320 1
a1320 1
	 printf( "Shifting error token, ");
d1331 1
a1331 1
#line 408 "cdt.y"
a1346 1
	{"catch"    ,T_CATCH     ,5},
a1347 1
	{"class"    ,T_CLASS     ,5},
a1350 1
	{"delete"   ,T_DELETE    ,6},
a1357 1
	{"friend"   ,T_FRIEND    ,6},
a1359 1
	{"inline"   ,T_INLINE    ,6},
a1361 5
	{"new"      ,T_NEW       ,3},
	{"operator" ,T_OPERATOR  ,8},
	{"private"  ,T_PRIVATE   ,7},
	{"protected",T_PROTECTED ,9},
	{"public"   ,T_PUBLIC    ,6},
a1369 2
	{"throw"    ,T_THROW     ,5},
	{"try"      ,T_TRY       ,3},
a1372 1
	{"virtual"  ,T_VIRTUAL   ,7},
d1379 20
d1417 1
a1417 1
/*FS*/ int cdtparse_lex(int *lvalp,struct ClassBase *cb,struct CParse *cparse)
d1419 1
d1429 2
d1434 2
d1438 2
d1443 1
a1443 1
				if(*ptr == '\t')
d1445 1
a1445 1
					addx = (tablen - (cparse->Chars % tablen));
d1447 2
a1448 2
					cparse->XOffsetAdd += addx;
					cparse->Chars      += addx;
d1450 2
a1451 1
					cparse->Chars++;
d1453 7
a1459 1
				ptr++;
d1462 2
d1465 1
a1465 1
			if(*ptr == '/' && ptr < end - 1 && (ptr[1] == '*' || ptr[1] == '/') && cparse->Mode != C_STRING)
d1467 6
d1499 1
a1499 1
							add_cexpr(cb,cparse,C_COMMENT,LNF_LF);
d1503 3
a1505 3
							cparse->ActPtr = ptr;
							if(cparse->Chars)
								add_cexpr(cb,cparse,C_COMMENT,0);
d1509 1
a1509 1
								if(*ptr == '\t')
d1511 1
a1511 1
									addx = (tablen - (cparse->Chars % tablen));
d1513 1
a1513 2
									cparse->XOffsetAdd += addx;
									cparse->Chars      += addx;
d1515 1
a1515 2
									cparse->Chars++;
								ptr++;
d1517 5
d1529 1
a1529 1
					add_cexpr(cb,cparse,C_COMMENT,0);
d1536 3
a1540 2
							add_cexpr(cb,cparse,C_COMMENT,0);

d1543 1
a1543 1
								addx = (tablen - (cparse->Chars % tablen));
d1545 1
a1545 2
								cparse->XOffsetAdd += addx;
								cparse->Chars      += addx;
d1548 2
a1553 1
					ptr++;
d1556 1
a1556 2
					add_cexpr(cb,cparse,C_COMMENT,LNF_LF);
					cparse->Chars = 0;
d1558 2
d1581 1
a1581 1
				if(cparse->Mode == C_CPP)
d1583 1
a1583 1
				else if(cparse->Mode == C_STANDARD)
d1605 19
a1638 1
				cparse->ActPtr = ptr + 1;
a1656 1
				cparse->ActPtr = ptr + 1;
a1674 1
				cparse->ActPtr = ptr + 1;
d1676 1
d1680 7
a1686 4
	DB(("token : %ld\n",retval));
	cparse->Token = retval;

	return(retval);
d1690 1
a1690 1
/*FS*/ void *cdtparse_alloc(struct ClassBase *cb,struct CParse *cparse,int size)
d1692 1
d1705 1
a1705 1
/*FS*/ void cdtparse_free(struct ClassBase *cb,struct CParse *cparse)
d1707 1
d1727 1
a1727 1
/*FS*/ void cdtparse_parseerror(struct ClassBase *cb,struct CParse *cparse)
d1729 1
d1732 1
a1732 1
	if((buf = AllocPooled(cparse->Data->cd_Pool,50)))
d1734 7
a1740 2
		STRPTR seg = cparse->SegPtr;
		STRPTR act = cparse->ActPtr;
d1742 5
a1746 4
		sprintf(buf,"Parse Error : last Token %4ld for line :",cparse->Token);
		cparse->SegPtr = buf;
		cparse->ActPtr = buf + strlen(buf);
		add_line(cb,cparse,C_STANDARD,LNF_LF);
d1756 6
a1761 3
		cparse->SegPtr = seg;
		cparse->ActPtr = act;
		add_line(cb,cparse,C_STANDARD,LNF_LF);
@


39.12
log
@*** empty log	message	***
@
text
@d79 1
a79 1
** $VER: cdt.y 39.11 (04.06.95)
d90 1
d356 13
a368 13
   198,   199,   202,   204,   205,   206,   207,   208,   209,   212,
   216,   219,   219,   222,   224,   225,   226,   227,   228,   229,
   230,   231,   232,   233,   236,   237,   240,   242,   244,   246,
   247,   250,   253,   257,   259,   260,   261,   262,   263,   264,
   266,   270,   272,   274,   276,   277,   278,   279,   280,   281,
   282,   283,   284,   285,   286,   287,   288,   289,   290,   291,
   292,   293,   294,   295,   296,   297,   298,   299,   300,   301,
   302,   305,   309,   312,   312,   314,   316,   318,   319,   322,
   323,   326,   328,   329,   330,   331,   332,   333,   334,   335,
   336,   339,   341,   342,   343,   346,   349,   353,   355,   356,
   357,   360,   363,   366,   368,   369,   370,   371,   372,   373,
   374,   378,   379,   382,   384,   388,   389,   390,   391,   392,
   393,   394,   397,   399,   400,   401,   402,   403,   404
d999 1
a999 1
#line 203 "cdt.y"
d1003 1
a1003 1
#line 204 "cdt.y"
d1007 1
a1007 1
#line 205 "cdt.y"
d1011 1
a1011 1
#line 206 "cdt.y"
d1015 1
a1015 1
#line 207 "cdt.y"
d1019 1
a1019 1
#line 213 "cdt.y"
d1023 1
a1023 1
#line 217 "cdt.y"
d1027 2
a1028 2
#line 241 "cdt.y"
{ add_cexpr(cb,cparse,C_CPP,0); cparse->Mode = C_CPPTEXTLIST; ;
d1031 1
a1031 1
#line 242 "cdt.y"
d1035 1
a1035 1
#line 251 "cdt.y"
d1040 1
a1040 1
#line 253 "cdt.y"
d1045 1
a1045 1
#line 260 "cdt.y"
d1049 1
a1049 1
#line 261 "cdt.y"
d1053 1
a1053 1
#line 262 "cdt.y"
d1057 1
a1057 1
#line 263 "cdt.y"
d1061 1
a1061 1
#line 264 "cdt.y"
d1065 1
a1065 1
#line 271 "cdt.y"
d1069 1
a1069 1
#line 310 "cdt.y"
d1073 1
a1073 1
#line 312 "cdt.y"
d1077 1
a1077 1
#line 323 "cdt.y"
d1081 1
a1081 1
#line 347 "cdt.y"
d1086 1
a1086 1
#line 349 "cdt.y"
d1091 1
a1091 1
#line 354 "cdt.y"
d1095 1
a1095 1
#line 356 "cdt.y"
d1099 1
a1099 1
#line 359 "cdt.y"
d1103 1
a1103 1
#line 360 "cdt.y"
d1108 1
a1108 1
#line 363 "cdt.y"
d1113 1
a1113 1
#line 379 "cdt.y"
d1117 1
a1117 1
#line 404 "cdt.y"
d1318 1
a1318 1
#line 407 "cdt.y"
d1413 1
d1493 1
a1493 2
							if(cparse->Chars)
								add_cexpr(cb,cparse,C_COMMENT,0);
@


39.11
log
@*** empty log	message	***
@
text
@d79 1
a79 1
** $VER: cdt.y 39.10 (10.05.95)
d90 1
d355 13
a367 13
   197,   198,   201,   203,   204,   205,   206,   207,   208,   211,
   215,   218,   218,   221,   223,   224,   225,   226,   227,   228,
   229,   230,   231,   232,   235,   236,   239,   241,   243,   245,
   246,   249,   252,   256,   258,   259,   260,   261,   262,   263,
   265,   269,   271,   273,   275,   276,   277,   278,   279,   280,
   281,   282,   283,   284,   285,   286,   287,   288,   289,   290,
   291,   292,   293,   294,   295,   296,   297,   298,   299,   300,
   301,   304,   308,   311,   311,   313,   315,   317,   318,   321,
   322,   325,   327,   328,   329,   330,   331,   332,   333,   334,
   335,   338,   340,   341,   342,   345,   348,   352,   354,   355,
   356,   359,   362,   365,   367,   368,   369,   370,   371,   372,
   373,   377,   378,   381,   383,   387,   388,   389,   390,   391,
   392,   393,   396,   398,   399,   400,   401,   402,   403
d998 1
a998 1
#line 202 "cdt.y"
d1002 1
a1002 1
#line 203 "cdt.y"
d1006 1
a1006 1
#line 204 "cdt.y"
d1010 1
a1010 1
#line 205 "cdt.y"
d1014 1
a1014 1
#line 206 "cdt.y"
d1018 1
a1018 1
#line 212 "cdt.y"
d1022 1
a1022 1
#line 216 "cdt.y"
d1026 1
a1026 1
#line 240 "cdt.y"
d1030 1
a1030 1
#line 241 "cdt.y"
d1034 1
a1034 1
#line 250 "cdt.y"
d1039 1
a1039 1
#line 252 "cdt.y"
d1044 1
a1044 1
#line 259 "cdt.y"
d1048 1
a1048 1
#line 260 "cdt.y"
d1052 1
a1052 1
#line 261 "cdt.y"
d1056 1
a1056 1
#line 262 "cdt.y"
d1060 1
a1060 1
#line 263 "cdt.y"
d1064 1
a1064 1
#line 270 "cdt.y"
d1068 1
a1068 1
#line 309 "cdt.y"
d1072 1
a1072 1
#line 311 "cdt.y"
d1076 1
a1076 1
#line 322 "cdt.y"
d1080 1
a1080 1
#line 346 "cdt.y"
d1085 1
a1085 1
#line 348 "cdt.y"
d1090 1
a1090 1
#line 353 "cdt.y"
d1094 1
a1094 1
#line 355 "cdt.y"
d1098 1
a1098 1
#line 358 "cdt.y"
d1102 1
a1102 1
#line 359 "cdt.y"
d1107 1
a1107 1
#line 362 "cdt.y"
d1112 1
a1112 1
#line 378 "cdt.y"
d1116 1
a1116 1
#line 403 "cdt.y"
d1317 1
a1317 1
#line 406 "cdt.y"
@


39.10
log
@*** empty log	message	***
@
text
@d79 1
a79 1
** $VER: cdt.y 39.9 (28.04.95)
d90 1
d104 1
a104 1
void add_line(struct ClassBase *cb,struct CParse *cparse,ULONG index,UWORD flags)
d114 1
a115 1
			ULONG x = cparse->XOffsetAdd;
d117 1
a117 1
			while(*ptr == ' ' || *ptr == '\t')
d119 28
a146 3
				if(*ptr == ' ')
					x += cparse->TabWidth;
				ptr++;
d150 1
d162 1
a162 1
			line->ln_XOffset  = cparse->XOffset + x;
d164 1
a164 1
			line->ln_Width    = TextLength(cparse->RPort,line->ln_Text,line->ln_TextLen) + x;
d202 1
d204 1
a204 1
void add_cexpr(struct ClassBase *cb,struct CParse *cparse,ULONG index,BOOL lf)
d227 1
d354 13
a366 13
   168,   169,   172,   174,   175,   176,   177,   178,   179,   182,
   186,   189,   189,   192,   194,   195,   196,   197,   198,   199,
   200,   201,   202,   203,   206,   207,   210,   212,   214,   216,
   217,   220,   223,   227,   229,   230,   231,   232,   233,   234,
   236,   240,   242,   244,   246,   247,   248,   249,   250,   251,
   252,   253,   254,   255,   256,   257,   258,   259,   260,   261,
   262,   263,   264,   265,   266,   267,   268,   269,   270,   271,
   272,   275,   279,   282,   282,   284,   286,   288,   289,   292,
   293,   296,   298,   299,   300,   301,   302,   303,   304,   305,
   306,   309,   311,   312,   313,   316,   319,   323,   325,   326,
   327,   330,   333,   336,   338,   339,   340,   341,   342,   343,
   344,   348,   349,   352,   354,   358,   359,   360,   361,   362,
   363,   364,   367,   369,   370,   371,   372,   373,   374
d997 1
a997 1
#line 173 "cdt.y"
d1001 1
a1001 1
#line 174 "cdt.y"
d1005 1
a1005 1
#line 175 "cdt.y"
d1009 1
a1009 1
#line 176 "cdt.y"
d1013 1
a1013 1
#line 177 "cdt.y"
d1017 1
a1017 1
#line 183 "cdt.y"
d1021 1
a1021 1
#line 187 "cdt.y"
d1025 1
a1025 1
#line 211 "cdt.y"
d1029 1
a1029 1
#line 212 "cdt.y"
d1033 1
a1033 1
#line 221 "cdt.y"
d1038 1
a1038 1
#line 223 "cdt.y"
d1043 1
a1043 1
#line 230 "cdt.y"
d1047 1
a1047 1
#line 231 "cdt.y"
d1051 1
a1051 1
#line 232 "cdt.y"
d1055 1
a1055 1
#line 233 "cdt.y"
d1059 1
a1059 1
#line 234 "cdt.y"
d1063 1
a1063 1
#line 241 "cdt.y"
d1067 1
a1067 1
#line 280 "cdt.y"
d1071 1
a1071 1
#line 282 "cdt.y"
d1075 1
a1075 1
#line 293 "cdt.y"
d1079 1
a1079 1
#line 317 "cdt.y"
d1084 1
a1084 1
#line 319 "cdt.y"
d1089 1
a1089 1
#line 324 "cdt.y"
d1093 1
a1093 1
#line 326 "cdt.y"
d1097 1
a1097 1
#line 329 "cdt.y"
d1101 1
a1101 1
#line 330 "cdt.y"
d1106 1
a1106 1
#line 333 "cdt.y"
d1111 1
a1111 1
#line 349 "cdt.y"
d1115 1
a1115 1
#line 374 "cdt.y"
d1316 1
a1316 1
#line 377 "cdt.y"
d1319 1
d1393 1
d1395 1
a1395 1
int cdtparse_lex(int *lvalp,struct ClassBase *cb,struct CParse *cparse)
d1402 1
a1402 1
	LONG addx,chrs;
a1410 1
			chrs = cparse->Chars;
d1417 1
a1417 4
					if(chrs)
						cparse->XOffsetAdd += addx * cparse->TabWidth;
					else
						cparse->XOffset    += addx * cparse->TabWidth;
d1459 1
a1459 2
							chrs = cparse->Chars;
							if(chrs)
d1461 1
d1468 1
a1468 4
									if(chrs > 0)
										cparse->XOffsetAdd += addx * cparse->TabWidth;
									else
										cparse->XOffset    += addx * cparse->TabWidth;
d1489 4
a1492 2
							add_cexpr(cb,cparse,C_COMMENT,0);
							chrs = cparse->Chars;
d1497 1
a1497 4
								if(chrs)
									cparse->XOffsetAdd += addx * cparse->TabWidth;
								else
									cparse->XOffset    += addx * cparse->TabWidth;
d1562 1
a1562 1
							if(!strncmp(node->ln_Name,name,len) && len == node->ln_Type)
d1619 1
d1621 1
a1621 1
void *cdtparse_alloc(struct ClassBase *cb,struct CParse *cparse,int size)
d1634 2
a1635 2

void cdtparse_free(struct ClassBase *cb,struct CParse *cparse)
d1648 1
d1650 1
a1650 1
int cdtparse_error(char *str)
d1655 2
a1656 2

void cdtparse_parseerror(struct ClassBase *cb,struct CParse *cparse)
d1683 1
@
