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 "Undernet IRC Server Source Code.".
The branch, u2_10_12_branch has been updated
via e50a5c3d682f5d11aa00be12fb93e766315ff35f (commit)
from 66304e01921030cec93aeded0de804b84fdc0589 (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 -----------------------------------------------------------------
commit e50a5c3d682f5d11aa00be12fb93e766315ff35f
Author: Michael Poole <[email protected]>
Date: Sat Dec 11 09:59:08 2021 -0500
Support primitive parser generators like byacc
yacc expects zero or negative from yylex() on EOF, but not all
implementations define YYEOF in y.tab.h. Define it if needed.
And most variants of yacc seem to use 256 as an error token, but that is
not specified and not always exported. So define a new token (TOKERR)
to indicate a tokenization error.
Fixes #15
diff --git a/include/ircd_lexer.h b/include/ircd_lexer.h
index 11adf3b8..8b054474 100644
--- a/include/ircd_lexer.h
+++ b/include/ircd_lexer.h
@@ -28,4 +28,6 @@ extern const char *lexer_position(int *lineno);
extern int lexer_allowed(unsigned int bitnum);
extern void deinit_lexer(void);
+extern int yyparse();
+
#endif /* INCLUDED_ircd_lexer_h */
diff --git a/ircd/ircd_lexer.c b/ircd/ircd_lexer.c
index 8005269d..75e61223 100644
--- a/ircd/ircd_lexer.c
+++ b/ircd/ircd_lexer.c
@@ -297,11 +297,14 @@ int yylex(void)
ssize_t nbr;
char save;
+#if !defined(YYEOF)
+# define YYEOF 0
+#endif
if (!yy_in)
return YYEOF;
if (yy_in->fd < 0)
- return YYerror;
+ return TOKERR;
for (;;) {
pos = yy_in->buf + yy_in->tok_ofs;
diff --git a/ircd/ircd_parser.y b/ircd/ircd_parser.y
index dfa311f7..fbafc8c2 100644
--- a/ircd/ircd_parser.y
+++ b/ircd/ircd_parser.y
@@ -220,9 +220,9 @@ static void free_slist(struct SLink **link) {
%token IPCHECK
%token EXCEPT
%token INCLUDE
-%token LINESYNC
%token FROM
%token TEOF
+%token TOKERR
/* and now a lot of privileges... */
%token TPRIV_CHAN_LIMIT TPRIV_MODE_LCHAN TPRIV_DEOP_LCHAN TPRIV_WALK_LCHAN
%token TPRIV_LOCAL_KILL TPRIV_REHASH TPRIV_RESTART TPRIV_DIE
-----------------------------------------------------------------------
Summary of changes:
include/ircd_lexer.h | 2 ++
ircd/ircd_lexer.c | 5 ++++-
ircd/ircd_parser.y | 2 +-
3 files changed, 7 insertions(+), 2 deletions(-)
hooks/post-receive
--
Undernet IRC Server Source Code.
--
You received this message because you are subscribed to the Google Groups
"Undernet Mailing List - [email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].