[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, feature/regex-type, updated. gawk-4.1.0-
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, feature/regex-type, updated. gawk-4.1.0-1456-g13127e2 |
Date: |
Fri, 12 Jun 2015 11:39:18 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, feature/regex-type has been updated
via 13127e20909b2ef212f5e467c8f3bb447091e4ef (commit)
via 9f7253c0300de05d6d001a82f8cf8b4040a0ae15 (commit)
via 0ffd72b9d9453442cadaa7330e94fb91b30e48b6 (commit)
via 9ca2921ea5b045037d0b80a2df75d448a43fd42e (commit)
from 1362f223522450a6395623b97000bc70464566ab (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=13127e20909b2ef212f5e467c8f3bb447091e4ef
commit 13127e20909b2ef212f5e467c8f3bb447091e4ef
Author: Arnold D. Robbins <address@hidden>
Date: Fri Jun 12 14:39:03 2015 +0300
Finish "hard" --> "typed" transition.
diff --git a/ChangeLog b/ChangeLog
index 3482acc..76ce8d9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-06-12 Arnold D. Robbins <address@hidden>
+
+ * awkgram.y: Finish converting "hard" regex to "typed" regex.
+
2015-05-31 Arnold D. Robbins <address@hidden>
* field.c (posix_def_parse_field): Removed. It's no longer
@@ -184,7 +188,6 @@
to malloc, test for final amount after all matches done and
need to copy in the final part of the original string.
-
2015-04-13 Arnold D. Robbins <address@hidden>
* regcomp.c (analyze): Prevent malloc(0).
diff --git a/awkgram.c b/awkgram.c
index 995b580..12f648e 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -245,7 +245,7 @@ extern int yydebug;
FILENAME = 261,
YNUMBER = 262,
YSTRING = 263,
- HARD_REGEXP = 264,
+ TYPED_REGEXP = 264,
RELOP = 265,
IO_OUT = 266,
IO_IN = 267,
@@ -300,7 +300,7 @@ extern int yydebug;
#define FILENAME 261
#define YNUMBER 262
#define YSTRING 263
-#define HARD_REGEXP 264
+#define TYPED_REGEXP 264
#define RELOP 265
#define IO_OUT 266
#define IO_IN 267
@@ -695,7 +695,7 @@ static const yytype_uint16 yyrline[] =
static const char *const yytname[] =
{
"$end", "error", "$undefined", "FUNC_CALL", "NAME", "REGEXP",
- "FILENAME", "YNUMBER", "YSTRING", "HARD_REGEXP", "RELOP", "IO_OUT",
+ "FILENAME", "YNUMBER", "YSTRING", "TYPED_REGEXP", "RELOP", "IO_OUT",
"IO_IN", "ASSIGNOP", "ASSIGN", "MATCHOP", "CONCAT_OP", "SUBSCRIPT",
"LEX_BEGIN", "LEX_END", "LEX_IF", "LEX_ELSE", "LEX_RETURN", "LEX_DELETE",
"LEX_SWITCH", "LEX_CASE", "LEX_DEFAULT", "LEX_WHILE", "LEX_DO",
@@ -708,7 +708,7 @@ static const char *const yytname[] =
"'!'", "UNARY", "'^'", "'$'", "'('", "')'", "'@'", "'['", "']'", "'{'",
"'}'", "';'", "$accept", "program", "rule", "source", "library",
"pattern", "action", "func_name", "lex_builtin", "function_prologue",
- "address@hidden", "regexp", "address@hidden", "hard_regexp", "a_slash",
"statements",
+ "address@hidden", "regexp", "address@hidden", "typed_regexp", "a_slash",
"statements",
"statement_term", "statement", "non_compound_stmt", "address@hidden",
"simple_stmt",
"address@hidden", "address@hidden", "opt_simple_stmt", "case_statements",
"case_statement",
"case_value", "print", "print_expression_list", "output_redir",
"address@hidden",
@@ -5695,7 +5695,7 @@ yylex(void)
bool inhex = false;
bool intlstr = false;
AWKNUM d;
- bool collecting_hard_regexp = false;
+ bool collecting_typed_regexp = false;
#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline)
@@ -5817,9 +5817,9 @@ end_regexp:
peek);
}
}
- if (collecting_hard_regexp) {
- collecting_hard_regexp = false;
- lasttok = HARD_REGEXP;
+ if (collecting_typed_regexp) {
+ collecting_typed_regexp = false;
+ lasttok = TYPED_REGEXP;
} else
lasttok = REGEXP;
@@ -5884,7 +5884,7 @@ retry:
c = nextc(true);
if (c == '/') {
want_regexp = true;
- collecting_hard_regexp = true;
+ collecting_typed_regexp = true;
goto collect_regexp;
}
pushback();
diff --git a/awkgram.y b/awkgram.y
index a6cade2..28541f8 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -169,7 +169,7 @@ extern double fmod(double x, double y);
%}
%token FUNC_CALL NAME REGEXP FILENAME
-%token YNUMBER YSTRING HARD_REGEXP
+%token YNUMBER YSTRING TYPED_REGEXP
%token RELOP IO_OUT IO_IN
%token ASSIGNOP ASSIGN MATCHOP CONCAT_OP
%token SUBSCRIPT
@@ -197,7 +197,7 @@ extern double fmod(double x, double y);
%left MATCHOP
%nonassoc RELOP '<' '>' IO_IN IO_OUT
%left CONCAT_OP
-%left YSTRING YNUMBER HARD_REGEXP
+%left YSTRING YNUMBER TYPED_REGEXP
%left '+' '-'
%left '*' '/' '%'
%right '!' UNARY
@@ -498,8 +498,8 @@ regexp
}
;
-hard_regexp
- : HARD_REGEXP
+typed_regexp
+ : TYPED_REGEXP
{
NODE *n, *exp;
char *re;
@@ -1221,7 +1221,7 @@ case_value
$1->opcode = Op_push;
$$ = $1;
}
- | hard_regexp
+ | typed_regexp
{
assert($1->memory->type == Node_typedregex);
$1->opcode = Op_push_re;
@@ -1411,7 +1411,7 @@ fcall_expression_list
fcall_exp
: exp { $$ = $1; }
- | hard_regexp { $$ = list_create($1); }
+ | typed_regexp { $$ = list_create($1); }
;
/* Expressions, not including the comma operator. */
@@ -1423,7 +1423,7 @@ exp
_("regular expression on right of assignment"));
$$ = mk_assignment($1, $3, $2);
}
- | variable ASSIGN hard_regexp %prec ASSIGNOP
+ | variable ASSIGN typed_regexp %prec ASSIGNOP
{
$$ = mk_assignment($1, list_create($3), $2);
}
@@ -1431,7 +1431,7 @@ exp
{ $$ = mk_boolean($1, $3, $2); }
| exp LEX_OR exp
{ $$ = mk_boolean($1, $3, $2); }
- | exp MATCHOP hard_regexp
+ | exp MATCHOP typed_regexp
{
if ($1->lasti->opcode == Op_match_rec)
warning_ln($2->source_line,
@@ -3275,7 +3275,7 @@ yylex(void)
bool inhex = false;
bool intlstr = false;
AWKNUM d;
- bool collecting_hard_regexp = false;
+ bool collecting_typed_regexp = false;
#define GET_INSTRUCTION(op) bcalloc(op, 1, sourceline)
@@ -3397,9 +3397,9 @@ end_regexp:
peek);
}
}
- if (collecting_hard_regexp) {
- collecting_hard_regexp = false;
- lasttok = HARD_REGEXP;
+ if (collecting_typed_regexp) {
+ collecting_typed_regexp = false;
+ lasttok = TYPED_REGEXP;
} else
lasttok = REGEXP;
@@ -3464,7 +3464,7 @@ retry:
c = nextc(true);
if (c == '/') {
want_regexp = true;
- collecting_hard_regexp = true;
+ collecting_typed_regexp = true;
goto collect_regexp;
}
pushback();
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=9f7253c0300de05d6d001a82f8cf8b4040a0ae15
commit 9f7253c0300de05d6d001a82f8cf8b4040a0ae15
Merge: 1362f22 0ffd72b
Author: Arnold D. Robbins <address@hidden>
Date: Fri Jun 12 14:35:41 2015 +0300
Merge branch 'master' into feature/regex-type
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 ++++-
awkgram.c | 18 +++++++++---------
awkgram.y | 26 +++++++++++++-------------
doc/ChangeLog | 5 +++++
doc/gawk.texi | 11 +++++++++++
doc/gawktexi.in | 11 +++++++++++
6 files changed, 53 insertions(+), 23 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, feature/regex-type, updated. gawk-4.1.0-1456-g13127e2,
Arnold Robbins <=