From 8b3b14a4b57ef8e2dabfcf1a8af0de8126e4b080 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 20 Feb 2016 12:39:46 -0500 Subject: Fix command substitution (warning: still ugly) --- (limited to 'parsing') 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}")" -- cgit v0.9.1