diff --git a/lexers/embedded/iscdhcpd.xml b/lexers/embedded/iscdhcpd.xml index babfb55bb..39c5c19ff 100644 --- a/lexers/embedded/iscdhcpd.xml +++ b/lexers/embedded/iscdhcpd.xml @@ -18,47 +18,32 @@ - - - - - - - - - - - - - - - - - - - + - + + + + + + + - - - - + @@ -70,21 +55,20 @@ - + + + + + - - - - - diff --git a/lexers/testdata/iscdhcpd.actual b/lexers/testdata/iscdhcpd.actual index 2dfec0a29..d741158dd 100644 --- a/lexers/testdata/iscdhcpd.actual +++ b/lexers/testdata/iscdhcpd.actual @@ -32,6 +32,7 @@ subnet 10.254.239.32 netmask 255.255.255.224 { option routers rtr-239-32-1.example.org; } + # A slightly different configuration for an internal subnet. subnet 10.5.5.0 netmask 255.255.255.224 { range 10.5.5.26 10.5.5.30; @@ -57,6 +58,7 @@ host fantasia { class "foo" { match if substring (option vendor-class-identifier, 0, 4) = "S\"UNW"; + log(info,concat("SUN request from ",host-decl-name)); } shared-network 224-29 { diff --git a/lexers/testdata/iscdhcpd.expected b/lexers/testdata/iscdhcpd.expected index 5b6492959..2bb95f85d 100644 --- a/lexers/testdata/iscdhcpd.expected +++ b/lexers/testdata/iscdhcpd.expected @@ -11,7 +11,7 @@ {"type":"Text","value":"\n"}, {"type":"Keyword","value":"option"}, {"type":"Text","value":" "}, - {"type":"Keyword","value":"domain-name-servers"}, + {"type":"NameVariable","value":"domain-name-servers"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"ns1.example.org"}, {"type":"Punctuation","value":","}, @@ -24,17 +24,17 @@ {"type":"NameVariable","value":"600"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n"}, - {"type":"NameVariable","value":"max-lease-time"}, + {"type":"Keyword","value":"max-lease-time"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"7200"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n\n"}, {"type":"NameVariable","value":"ddns-update-style"}, {"type":"Text","value":" "}, - {"type":"NameVariable","value":"none"}, + {"type":"KeywordConstant","value":"none"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n\n"}, - {"type":"Keyword","value":"authoritative"}, + {"type":"NameVariable","value":"authoritative"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n\n"}, {"type":"NameVariable","value":"log-facility"}, @@ -54,7 +54,7 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"range"}, + {"type":"KeywordType","value":"range"}, {"type":"Text","value":" "}, {"type":"LiteralNumberFloat","value":"10.254.239.10"}, {"type":"Text","value":" "}, @@ -83,7 +83,7 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"range"}, + {"type":"KeywordType","value":"range"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"dynamic-bootp"}, {"type":"Text","value":" "}, @@ -107,7 +107,7 @@ {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n"}, {"type":"Punctuation","value":"}"}, - {"type":"Text","value":"\n\n"}, + {"type":"Text","value":"\n\n\n"}, {"type":"Comment","value":"# A slightly different configuration for an internal subnet.\n"}, {"type":"KeywordType","value":"subnet"}, {"type":"Text","value":" "}, @@ -119,7 +119,7 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"range"}, + {"type":"KeywordType","value":"range"}, {"type":"Text","value":" "}, {"type":"LiteralNumberFloat","value":"10.5.5.26"}, {"type":"Text","value":" "}, @@ -128,7 +128,7 @@ {"type":"Text","value":"\n "}, {"type":"Keyword","value":"option"}, {"type":"Text","value":" "}, - {"type":"Keyword","value":"domain-name-servers"}, + {"type":"NameVariable","value":"domain-name-servers"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"ns1.internal.example.org"}, {"type":"Punctuation","value":";"}, @@ -167,7 +167,7 @@ {"type":"NameVariable","value":"600"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"max-lease-time"}, + {"type":"Keyword","value":"max-lease-time"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"7200"}, {"type":"Punctuation","value":";"}, @@ -182,12 +182,12 @@ {"type":"Text","value":"\n "}, {"type":"Keyword","value":"hardware"}, {"type":"Text","value":" "}, - {"type":"Keyword","value":"ethernet"}, + {"type":"NameVariable","value":"ethernet"}, {"type":"Text","value":" "}, {"type":"LiteralNumberHex","value":"0:0:c0:5d:bd:95"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"filename"}, + {"type":"Keyword","value":"filename"}, {"type":"Text","value":" "}, {"type":"LiteralString","value":"\"vmunix.passacaglia\""}, {"type":"Punctuation","value":";"}, @@ -207,12 +207,12 @@ {"type":"Text","value":"\n "}, {"type":"Keyword","value":"hardware"}, {"type":"Text","value":" "}, - {"type":"Keyword","value":"ethernet"}, + {"type":"NameVariable","value":"ethernet"}, {"type":"Text","value":" "}, {"type":"LiteralNumberHex","value":"08:00:07:26:c0:a5"}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n "}, - {"type":"Keyword","value":"fixed-address"}, + {"type":"NameVariable","value":"fixed-address"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"fantasia.example.com"}, {"type":"Punctuation","value":";"}, @@ -225,14 +225,14 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"match"}, + {"type":"Keyword","value":"match"}, {"type":"Text","value":" "}, {"type":"Keyword","value":"if"}, {"type":"Text","value":" "}, {"type":"NameFunction","value":"substring"}, {"type":"Text","value":" "}, {"type":"Punctuation","value":"("}, - {"type":"NameVariable","value":"option"}, + {"type":"Keyword","value":"option"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"vendor-class-identifier"}, {"type":"Punctuation","value":","}, @@ -249,10 +249,21 @@ {"type":"LiteralStringEscape","value":"\\\""}, {"type":"LiteralString","value":"UNW\""}, {"type":"Punctuation","value":";"}, + {"type":"Text","value":"\n "}, + {"type":"NameFunction","value":"log"}, + {"type":"Punctuation","value":"("}, + {"type":"NameVariable","value":"info"}, + {"type":"Punctuation","value":","}, + {"type":"NameFunction","value":"concat"}, + {"type":"Punctuation","value":"("}, + {"type":"LiteralString","value":"\"SUN request from \""}, + {"type":"Punctuation","value":","}, + {"type":"Keyword","value":"host-decl-name"}, + {"type":"Punctuation","value":"));"}, {"type":"Text","value":"\n"}, {"type":"Punctuation","value":"}"}, {"type":"Text","value":"\n\n"}, - {"type":"NameVariable","value":"shared-network"}, + {"type":"KeywordType","value":"shared-network"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"224-29"}, {"type":"Text","value":" "}, @@ -300,7 +311,7 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"allow"}, + {"type":"Keyword","value":"allow"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"members"}, {"type":"Text","value":" "}, @@ -309,7 +320,7 @@ {"type":"LiteralString","value":"\"foo\""}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"range"}, + {"type":"KeywordType","value":"range"}, {"type":"Text","value":" "}, {"type":"LiteralNumberFloat","value":"10.17.224.10"}, {"type":"Text","value":" "}, @@ -322,7 +333,7 @@ {"type":"Text","value":" "}, {"type":"Punctuation","value":"{"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"deny"}, + {"type":"Keyword","value":"deny"}, {"type":"Text","value":" "}, {"type":"NameVariable","value":"members"}, {"type":"Text","value":" "}, @@ -331,7 +342,7 @@ {"type":"LiteralString","value":"\"foo\""}, {"type":"Punctuation","value":";"}, {"type":"Text","value":"\n "}, - {"type":"NameVariable","value":"range"}, + {"type":"KeywordType","value":"range"}, {"type":"Text","value":" "}, {"type":"LiteralNumberFloat","value":"10.0.29.10"}, {"type":"Text","value":" "},