# QMP 1.0 # v1 -> v2 # o allow integer in symbol names (C-style) # o allow negative integer/floats # o no newlines in strings # o one value per response_data line __skip__: [ \t]+ symbol: [A-Za-z_\-][A-Za-z_\-0-9]* decimalinteger: (-)?[1-9][0-9]+ hexinteger: 0x[0-9]+ float: (-)?[0-9]+\.[0-9]+ string: \"([^\"\\\n]|(\\[0-9][0-9][0-9]))*\" | symbol number: float | decimalinteger | hexinteger comma_arg_list: value (',' comma_arg_list)? list: '[' comma_arg_list? ']' dict_list: string ':' value (',' dict_list)? dictionary: '{' dict_list? '}' value: (string | number | list | dictionary) arg_list: value arg_list? command: symbol arg_list? '\n' response_status: ('+' | '-') number string? '\n' response_data: '=' value '\n' async_msg: '*' arg_list '\n' response: async_msg | response_data* response_status