From 7f5644bb6c124cdea0b9338ef69cfcfb8291e378 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 30 Jul 2009 10:08:33 -0400 Subject: [PATCH] parser: perl code of prescc looks at all parameters in a line Signed-off-by: Jean Privat --- src/parser/prescc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser/prescc.sh b/src/parser/prescc.sh index b84a0fb..e5ab277 100755 --- a/src/parser/prescc.sh +++ b/src/parser/prescc.sh @@ -63,7 +63,7 @@ printf "/* This file is autogenerated, do not modify it */" > "$outfile" cat "$infile" >> "$outfile" # The perl code is used to list all the available parameters in the extended grammar -for token in `perl -ne 'while (s/\~([a-zA-Z]+)// && !$found{$1}) {print "$1\n"; $found{$1}=1}' "$infile"` +for token in `perl -ne 'while (/\~([a-zA-Z]+)/g) {if (!$found{$1}) {print "$1\n"; $found{$1}=1}}' "$infile"` do echo "Parameter ~$token" # first, sed starts from first line to the AST line and removes ~xxx and !xxx -- 1.7.9.5