fixed a bug in matching zero occurrence in a group
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
|
||||
# EXTRA_DIST = README
|
||||
SUBDIRS = cmn utl awk lsp
|
||||
SUBDIRS = cmn sed awk lsp utl
|
||||
|
||||
pkginclude_HEADERS = config.h.in conf_msw.h conf_vms.h types.h macros.h pack1.h unpack.h
|
||||
|
||||
|
@ -211,7 +211,7 @@ top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
||||
# EXTRA_DIST = README
|
||||
SUBDIRS = cmn utl awk lsp
|
||||
SUBDIRS = cmn sed awk lsp utl
|
||||
pkginclude_HEADERS = config.h.in conf_msw.h conf_vms.h types.h \
|
||||
macros.h pack1.h unpack.h $(am__append_1)
|
||||
CLEANFILES = *dist
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: Awk.hpp 202 2009-06-16 06:05:40Z hyunghwan.chung $
|
||||
* $Id: Awk.hpp 204 2009-06-18 12:08:06Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
@ -29,6 +29,11 @@
|
||||
QSE_BEGIN_NAMESPACE(QSE)
|
||||
/////////////////////////////////
|
||||
|
||||
/**
|
||||
* @example Awk.cpp
|
||||
* This program demonstrates how to build a complete awk interpreter in C++.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Represents the AWK interpreter engine
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: awk.h 202 2009-06-16 06:05:40Z hyunghwan.chung $
|
||||
* $Id: awk.h 204 2009-06-18 12:08:06Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
/** @file
|
||||
* An embeddable AWK interpreter is defined in this header files.
|
||||
*
|
||||
* @example awk.c
|
||||
* This program demonstrates how to build a complete awk interpreter.
|
||||
* @example awk01.c
|
||||
* This program demonstrates how to use qse_awk_rtx_loop().
|
||||
* @example awk02.c
|
||||
@ -55,13 +57,13 @@ typedef struct qse_awk_rtx_t qse_awk_rtx_t; /* (R)untime con(T)e(X)t */
|
||||
#if QSE_SIZEOF_INT == 2
|
||||
# define QSE_AWK_VAL_HDR \
|
||||
unsigned int type: 3; \
|
||||
unsigned int ref: 11 \
|
||||
unsigned int nstr: 2;
|
||||
unsigned int ref: 11; \
|
||||
unsigned int nstr: 2
|
||||
#else
|
||||
# define QSE_AWK_VAL_HDR \
|
||||
unsigned int type: 3; \
|
||||
unsigned int ref: 27; \
|
||||
unsigned int nstr: 2;
|
||||
unsigned int nstr: 2
|
||||
#endif
|
||||
|
||||
#define QSE_AWK_VAL_TYPE(x) ((x)->type)
|
||||
@ -160,7 +162,6 @@ struct qse_awk_val_ref_t
|
||||
};
|
||||
typedef struct qse_awk_val_ref_t qse_awk_val_ref_t;
|
||||
|
||||
|
||||
typedef qse_real_t (*qse_awk_pow_t) (
|
||||
qse_awk_t* awk,
|
||||
qse_real_t x,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: fio.h 75 2009-02-22 14:10:34Z hyunghwan.chung $
|
||||
* $Id: fio.h 204 2009-06-18 12:08:06Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
@ -80,7 +80,18 @@ enum qse_fio_mode_t
|
||||
#endif
|
||||
|
||||
/* file offset */
|
||||
typedef qse_int64_t qse_fio_off_t;
|
||||
#if defined(QSE_HAVE_INT64_T) && (QSE_SIZEOF_OFF64_T==8)
|
||||
typedef qse_int64_t qse_fio_off_t;
|
||||
#elif defined(QSE_HAVE_INT64_T) && (QSE_SIZEOF_OFF_T==8)
|
||||
typedef qse_int64_t qse_fio_off_t;
|
||||
#elif defined(QSE_HAVE_INT32_T) && (QSE_SIZEOF_OFF_T==4)
|
||||
typedef qse_int32_t qse_fio_off_t;
|
||||
#elif defined(QSE_HAVE_INT16_T) && (QSE_SIZEOF_OFF_T==2)
|
||||
typedef qse_int16_t qse_fio_off_t;
|
||||
#else
|
||||
# error Unsupported platform
|
||||
#endif
|
||||
|
||||
typedef enum qse_fio_seek_origin_t qse_fio_ori_t;
|
||||
|
||||
typedef struct qse_fio_t qse_fio_t;
|
||||
|
@ -165,6 +165,9 @@
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#undef HAVE_TIME_H
|
||||
|
||||
/* Define to 1 if you have the `towctrans' function. */
|
||||
#undef HAVE_TOWCTRANS
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
@ -195,6 +198,9 @@
|
||||
/* Define to 1 if you have the `wcsrtombs' function. */
|
||||
#undef HAVE_WCSRTOMBS
|
||||
|
||||
/* Define to 1 if you have the `wctrans' function. */
|
||||
#undef HAVE_WCTRANS
|
||||
|
||||
/* Define to 1 if you have the <wctype.h> header file. */
|
||||
#undef HAVE_WCTYPE_H
|
||||
|
||||
@ -259,6 +265,12 @@
|
||||
/* sizeof(long long) */
|
||||
#undef QSE_SIZEOF_LONG_LONG
|
||||
|
||||
/* sizeof(off64_t) */
|
||||
#undef QSE_SIZEOF_OFF64_T
|
||||
|
||||
/* sizeof(off_t) */
|
||||
#undef QSE_SIZEOF_OFF_T
|
||||
|
||||
/* sizeof(short) */
|
||||
#undef QSE_SIZEOF_SHORT
|
||||
|
||||
@ -319,6 +331,12 @@
|
||||
/* The size of `long long', as computed by sizeof. */
|
||||
#undef SIZEOF_LONG_LONG
|
||||
|
||||
/* The size of `off64_t', as computed by sizeof. */
|
||||
#undef SIZEOF_OFF64_T
|
||||
|
||||
/* The size of `off_t', as computed by sizeof. */
|
||||
#undef SIZEOF_OFF_T
|
||||
|
||||
/* The size of `short', as computed by sizeof. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* $Id: types.h 186 2009-06-06 13:42:57Z hyunghwan.chung $
|
||||
* $Id: types.h 204 2009-06-18 12:08:06Z hyunghwan.chung $
|
||||
*
|
||||
Copyright 2006-2009 Chung, Hyung-Hwan.
|
||||
|
||||
@ -116,9 +116,13 @@ typedef enum qse_tri_t qse_tri_t;
|
||||
* The qse_uint8_t type defines an 8-bit unsigned integer type.
|
||||
*/
|
||||
#if QSE_SIZEOF_CHAR == 1
|
||||
# define QSE_HAVE_INT8_T
|
||||
# define QSE_HAVE_UINT8_T
|
||||
typedef char qse_int8_t;
|
||||
typedef unsigned char qse_uint8_t;
|
||||
#elif QSE_SIZEOF___INT8 == 1
|
||||
# define QSE_HAVE_INT8_T
|
||||
# define QSE_HAVE_UINT8_T
|
||||
typedef __int8 qse_int8_t;
|
||||
typedef unsigned __int8 qse_uint8_t;
|
||||
#endif
|
||||
@ -130,9 +134,13 @@ typedef enum qse_tri_t qse_tri_t;
|
||||
* The qse_uint16_t type defines an 16-bit unsigned integer type.
|
||||
*/
|
||||
#if QSE_SIZEOF_SHORT == 2
|
||||
# define QSE_HAVE_INT16_T
|
||||
# define QSE_HAVE_UINT16_T
|
||||
typedef short qse_int16_t;
|
||||
typedef unsigned short qse_uint16_t;
|
||||
#elif QSE_SIZEOF___INT16 == 2
|
||||
# define QSE_HAVE_INT16_T
|
||||
# define QSE_HAVE_UINT16_T
|
||||
typedef __int16 qse_int16_t;
|
||||
typedef unsigned __int16 qse_uint16_t;
|
||||
#endif
|
||||
@ -144,12 +152,18 @@ typedef enum qse_tri_t qse_tri_t;
|
||||
* The qse_uint32_t type defines an 32-bit unsigned integer type.
|
||||
*/
|
||||
#if QSE_SIZEOF_INT == 4
|
||||
# define QSE_HAVE_INT32_T
|
||||
# define QSE_HAVE_UINT32_T
|
||||
typedef int qse_int32_t;
|
||||
typedef unsigned int qse_uint32_t;
|
||||
#elif QSE_SIZEOF_LONG == 4
|
||||
# define QSE_HAVE_INT32_T
|
||||
# define QSE_HAVE_UINT32_T
|
||||
typedef long qse_int32_t;
|
||||
typedef unsigned long qse_uint32_t;
|
||||
#elif QSE_SIZEOF___INT32 == 4
|
||||
# define QSE_HAVE_INT32_T
|
||||
# define QSE_HAVE_UINT32_T
|
||||
typedef __int32 qse_int32_t;
|
||||
typedef unsigned __int32 qse_uint32_t;
|
||||
#endif
|
||||
@ -265,7 +279,7 @@ typedef int qse_mcint_t;
|
||||
* #QSE_WCHAR_EOF.
|
||||
*/
|
||||
#if defined(__cplusplus) && \
|
||||
(!defined(_MSC_VER) || \
|
||||
(!(defined(_MSC_VER) || defined(_SCO_DS)) || \
|
||||
(defined(_MSC_VER) && defined(_NATIVE_WCHAR_T_DEFINED)))
|
||||
/* C++ */
|
||||
|
||||
|
Reference in New Issue
Block a user