*** empty log message ***
This commit is contained in:
		@ -1,5 +1,5 @@
 | 
			
		||||
/* 
 | 
			
		||||
 * $Id: awk.h,v 1.189 2007-02-11 14:07:28 bacon Exp $
 | 
			
		||||
 * $Id: awk.h,v 1.190 2007-02-18 11:12:18 bacon Exp $
 | 
			
		||||
 *
 | 
			
		||||
 * {License}
 | 
			
		||||
 */
 | 
			
		||||
@ -160,10 +160,11 @@ enum
 | 
			
		||||
/* various options */
 | 
			
		||||
enum 
 | 
			
		||||
{ 
 | 
			
		||||
	/* allow undeclared variables */
 | 
			
		||||
	/* allow undeclared variables and implicit concatenation */
 | 
			
		||||
	ASE_AWK_IMPLICIT    = (1 << 0),
 | 
			
		||||
 | 
			
		||||
	/* allow explicit variable declarations */
 | 
			
		||||
	/* allow explicit variable declaration and the concatenation
 | 
			
		||||
	 * operator, a period. */
 | 
			
		||||
	ASE_AWK_EXPLICIT    = (1 << 1), 
 | 
			
		||||
 | 
			
		||||
	/* a function name should not coincide to be a variable name */
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
/*
 | 
			
		||||
 * $Id: parse.c,v 1.241 2007-02-03 10:47:41 bacon Exp $
 | 
			
		||||
 * $Id: parse.c,v 1.242 2007-02-18 11:12:18 bacon Exp $
 | 
			
		||||
 *
 | 
			
		||||
 * {License}
 | 
			
		||||
 */
 | 
			
		||||
@ -2286,12 +2286,22 @@ static ase_awk_nde_t* __parse_concat (ase_awk_t* awk, ase_size_t line)
 | 
			
		||||
	left = __parse_additive (awk, line);
 | 
			
		||||
	if (left == ASE_NULL) return ASE_NULL;
 | 
			
		||||
 | 
			
		||||
	/* TODO: write a better code to do this.... 
 | 
			
		||||
	 *       first of all, is the following check sufficient? */
 | 
			
		||||
	while (MATCH(awk,TOKEN_LPAREN) || 
 | 
			
		||||
	       MATCH(awk,TOKEN_DOLLAR) ||
 | 
			
		||||
	       awk->token.type >= TOKEN_GETLINE)
 | 
			
		||||
	while (1)
 | 
			
		||||
	{
 | 
			
		||||
		if (MATCH(awk,TOKEN_PERIOD))
 | 
			
		||||
		{
 | 
			
		||||
			if ((awk->option & ASE_AWK_EXPLICIT) == 0) break;	
 | 
			
		||||
			if (__get_token(awk) == -1) return ASE_NULL;
 | 
			
		||||
		}
 | 
			
		||||
		else if (MATCH(awk,TOKEN_LPAREN) ||
 | 
			
		||||
	                 MATCH(awk,TOKEN_DOLLAR) ||
 | 
			
		||||
	                 awk->token.type >= TOKEN_GETLINE)
 | 
			
		||||
		{
 | 
			
		||||
			/* TODO: is the check above sufficient? */
 | 
			
		||||
			if ((awk->option & ASE_AWK_IMPLICIT) == 0) break;
 | 
			
		||||
		}
 | 
			
		||||
		else break;
 | 
			
		||||
 | 
			
		||||
		right = __parse_additive (awk, awk->token.line);
 | 
			
		||||
		if (right == ASE_NULL) 
 | 
			
		||||
		{
 | 
			
		||||
@ -4195,9 +4205,17 @@ static int __get_token (ase_awk_t* awk)
 | 
			
		||||
 | 
			
		||||
		if (ASE_AWK_ISDIGIT (awk, c))
 | 
			
		||||
		{
 | 
			
		||||
			awk->src.lex.curc = ASE_T('.');
 | 
			
		||||
			if (__unget_char (awk, c) == -1) return -1;
 | 
			
		||||
			if (__get_number (awk) == -1) return -1;
 | 
			
		||||
 | 
			
		||||
		}
 | 
			
		||||
		else /*if (ASE_AWK_ISSPACE (awk, c) || c == ASE_CHAR_EOF)*/
 | 
			
		||||
		{
 | 
			
		||||
			SET_TOKEN_TYPE (awk, TOKEN_PERIOD);
 | 
			
		||||
			ADD_TOKEN_CHAR (awk, ASE_T('.'));
 | 
			
		||||
		}
 | 
			
		||||
		/*
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			ase_awk_seterror (
 | 
			
		||||
@ -4205,6 +4223,7 @@ static int __get_token (ase_awk_t* awk)
 | 
			
		||||
				ASE_T("floating point not followed by any valid digits"));
 | 
			
		||||
			return -1;
 | 
			
		||||
		}
 | 
			
		||||
		*/
 | 
			
		||||
	}
 | 
			
		||||
	else if (ASE_AWK_ISALPHA (awk, c) || c == ASE_T('_')) 
 | 
			
		||||
	{
 | 
			
		||||
@ -4561,12 +4580,6 @@ static int __get_token (ase_awk_t* awk)
 | 
			
		||||
		ADD_TOKEN_CHAR (awk, c);
 | 
			
		||||
		GET_CHAR (awk);
 | 
			
		||||
	}
 | 
			
		||||
	else if (c == ASE_T('.'))
 | 
			
		||||
	{
 | 
			
		||||
		SET_TOKEN_TYPE (awk, TOKEN_PERIOD);
 | 
			
		||||
		ADD_TOKEN_CHAR (awk, c);
 | 
			
		||||
		GET_CHAR (awk);
 | 
			
		||||
	}
 | 
			
		||||
	else if (c == ASE_T(';'))
 | 
			
		||||
	{
 | 
			
		||||
		SET_TOKEN_TYPE (awk, TOKEN_SEMICOLON);
 | 
			
		||||
 | 
			
		||||
@ -1,5 +1,5 @@
 | 
			
		||||
/*
 | 
			
		||||
 * $Id: val.h,v 1.60 2007-02-03 10:47:42 bacon Exp $
 | 
			
		||||
 * $Id: val.h,v 1.61 2007-02-18 11:12:18 bacon Exp $
 | 
			
		||||
 *
 | 
			
		||||
 * {License}
 | 
			
		||||
 */
 | 
			
		||||
@ -70,12 +70,12 @@ typedef struct ase_awk_val_ref_t  ase_awk_val_ref_t;
 | 
			
		||||
 | 
			
		||||
#ifndef ASE_AWK_NDE_INT_DEFINED
 | 
			
		||||
#define ASE_AWK_NDE_INT_DEFINED
 | 
			
		||||
typedef struct ase_awk_nde_int_t       ase_awk_nde_int_t;
 | 
			
		||||
typedef struct ase_awk_nde_int_t ase_awk_nde_int_t;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#ifndef ASE_AWK_NDE_REAL_DEFINED
 | 
			
		||||
#define ASE_AWK_NDE_REAL_DEFINED
 | 
			
		||||
typedef struct ase_awk_nde_real_t      ase_awk_nde_real_t;
 | 
			
		||||
typedef struct ase_awk_nde_real_t ase_awk_nde_real_t;
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user