Allow service names that contain dashes, e.g. snmp-trap.

This commit is contained in:
Sam Hocevar 2021-02-13 12:02:07 +01:00
parent 2681d17eb4
commit 04d1b74e24
2 changed files with 3 additions and 3 deletions

View File

@ -726,7 +726,7 @@ YY_RULE(int) yy_name(yycontext *yy)
{ int yypos0= yy->__pos, yythunkpos0= yy->__thunkpos;
yyprintf((stderr, "%s\n", "name")); if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\000\000\376\377\377\007\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l15;
l16:;
{ int yypos17= yy->__pos, yythunkpos17= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\000\377\003\376\377\377\207\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l17; goto l16;
{ int yypos17= yy->__pos, yythunkpos17= yy->__thunkpos; if (!yymatchClass(yy, (unsigned char *)"\000\000\000\000\000\040\377\003\376\377\377\207\376\377\377\007\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000")) goto l17; goto l16;
l17:; yy->__pos= yypos17; yy->__thunkpos= yythunkpos17;
}
yyprintf((stderr, " ok %s @ %s\n", "name", yy->__buf+yy->__pos));

View File

@ -1,6 +1,6 @@
# Copyright © 1997—1999 Thomas Boutell <boutell@boutell.com>
# and Boutell.Com, Inc.
# © 2003—2019 Sam Hocevar <sam@hocevar.net>
# © 2003—2021 Sam Hocevar <sam@hocevar.net>
#
# This software is released for free use under the terms of
# the GNU Public License, version 2 or higher. NO WARRANTY
@ -149,7 +149,7 @@ ipv4 = number '.' number '.' number '.' number | '0'
hostname = ([-0-9a-zA-Z_]+ '.')* [a-zA-Z][-0-9a-zA-Z_]* '.'?
name = [a-zA-Z][a-zA-Z0-9_]*
name = [a-zA-Z][-a-zA-Z0-9_]*
filename = '"' [^"]+ '"'
| [^ \t\r\n]+