From 1af50ec84a39ef50c9ec5f17b2a7b4a1ce514b2a Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Tue, 11 Sep 2018 12:59:53 +0200 Subject: Allow all characters except braces, quotes, and whitespace in "identifiers" (bare strings that can be either node identifiers or leaf node values). That's required for compatibility with old configs because old configs allow it, for example, "pre-shared secret f%#$!@*&". --- debian/changelog | 6 ++++++ parser/vyos1x_lexer.mll | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index cdfb586..27954ff 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +libvyosconfig0 (0.0.3) unstable; urgency=medium + + * Allow all characters except braces, quotes, and whitespace in identifiers. + + -- Daniil Baturin Tue, 11 Sep 2018 12:57:39 +0200 + libvyosconfig0 (0.0.2) unstable; urgency=medium * Add support for node renaming. diff --git a/parser/vyos1x_lexer.mll b/parser/vyos1x_lexer.mll index 1969b91..73bcd83 100644 --- a/parser/vyos1x_lexer.mll +++ b/parser/vyos1x_lexer.mll @@ -66,7 +66,7 @@ rule token = parse { vy_inside_node := false; LEFT_BRACE } | '}' { vy_inside_node := false; RIGHT_BRACE } -| [^ ' ' '\t' '\n' '\r' '{' '}' '[' ']' ';' '#' '"' ''' ]+ as s +| [^ ' ' '\t' '\n' '\r' '{' '}' '"' ''' ]+ as s { vy_inside_node := true; IDENTIFIER s} | eof { EOF } -- cgit v1.2.3