@@ -52,7 +52,7 @@ Differences:
* Strings are restricted to printable ASCII, and escape sequences to
just '\\'.
-* Numbers are not supported.
+* Numbers and null are not supported.
A second layer of syntax defines the sequences of JSON texts that are
a correctly structured QAPI schema. We provide a grammar for this
@@ -67,7 +67,7 @@ syntax in an EBNF-like notation:
expression A separated by ,
* Grouping: expression ( A ) matches expression A
* JSON's structural characters are terminals: { } [ ] : ,
-* JSON's literal names are terminals: false true null
+* JSON's literal names are terminals: false true
* String literals enclosed in 'single quotes' are terminal, and match
this JSON string, with a leading '*' stripped off
* When JSON object member's name starts with '*', the member is
@@ -548,10 +548,6 @@ class QAPISchemaParser(object):
self.val = False
self.cursor += 4
return
- elif self.src.startswith('null', self.pos):
- self.val = None
- self.cursor += 3
- return
elif self.tok == '\n':
if self.cursor == len(self.src):
self.tok = None
@@ -0,0 +1 @@
+tests/qapi-schema/features-if-invalid.json:2: 'if' condition must be a string or a list of strings
@@ -1 +1 @@
-0
+1
@@ -1,5 +1,4 @@
# Cover feature with invalid 'if'
-# FIXME not rejected, misinterpreted as unconditional
{ 'struct': 'Stru',
'data': {},
- 'features': [{'name': 'f', 'if': null }] }
+ 'features': [{'name': 'f', 'if': false }] }
@@ -1,14 +0,0 @@
-module None
-object q_empty
-enum QType
- prefix QTYPE
- member none
- member qnull
- member qnum
- member qstring
- member qdict
- member qlist
- member qbool
-module features-if-invalid.json
-object Stru
- feature f
@@ -1,3 +1,3 @@
# 'name-case-whitelist' must be list of strings
-{ 'pragma': { 'name-case-whitelist': null } }
+{ 'pragma': { 'name-case-whitelist': false } }