params: fixed parsing of value lists with -1 elements

This commit is contained in:
Andrew Tridgell 2012-11-20 20:27:00 +11:00
parent 7a9ef49ea7
commit 5bd88ac3b1
1 changed files with 3 additions and 1 deletions

4
Tools/autotest/param_metadata/param_parse.py Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
import os, glob, re import os, glob, re
from param import * from param import *
@ -13,7 +15,7 @@ prog_groups = re.compile(r"@Group:\s*(\w+).*((?:\n\s*//\s*@(\w+): (.*))+)\s*G",
prog_group_param = re.compile(r"@Param:\s*(\w+).*((?:\n\s*//\s*@(\w+): (.*))+)\s*AP_", re.MULTILINE) prog_group_param = re.compile(r"@Param:\s*(\w+).*((?:\n\s*//\s*@(\w+): (.*))+)\s*AP_", re.MULTILINE)
prog_values_field = re.compile(r"\s*(\w+:\w+)+,*") prog_values_field = re.compile(r"\s*(-?\w+:\w+)+,*")
def camelcase_escape(word): def camelcase_escape(word):
if re.match(r"([A-Z][a-z]+[A-Z][a-z]*)", word.strip()): if re.match(r"([A-Z][a-z]+[A-Z][a-z]*)", word.strip()):