summaryrefslogtreecommitdiffstats
path: root/parsing
diff options
context:
space:
mode:
Diffstat (limited to 'parsing')
-rw-r--r--parsing/parse.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/parsing/parse.sh b/parsing/parse.sh
index 4d4b9ea..da9b2e5 100644
--- a/parsing/parse.sh
+++ b/parsing/parse.sh
@@ -603,7 +603,11 @@ parse_sub()
get_lineno
printf '%c' "${RS}"
- get_lexer_char
+ if accept T_RPAREN; then
+ printf ')'
+ else
+ get_lexer_char
+ fi
printf '%c' "${RS}"
get_tokens
@@ -631,6 +635,7 @@ try()
printf 'Trying script:\n'
printf '\t%s\n' "${@}"
if tokens="$(printf '%s\n' "${@}" | parse -)"; then
+ printf 'Tokens: %s\n' "${tokens}"
IFS="${RS}"
for t in ${tokens}; do
printf 'Token: %s\n' "$(tokname "${t}")"