summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/pysh/pyshyacc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/pysh/pyshyacc.py')
-rw-r--r--bitbake/lib/bb/pysh/pyshyacc.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/bitbake/lib/bb/pysh/pyshyacc.py b/bitbake/lib/bb/pysh/pyshyacc.py
index ba4cefdcb8..de565dc9af 100644
--- a/bitbake/lib/bb/pysh/pyshyacc.py
+++ b/bitbake/lib/bb/pysh/pyshyacc.py
@@ -636,13 +636,16 @@ def p_empty(p):
636def p_error(p): 636def p_error(p):
637 msg = [] 637 msg = []
638 w = msg.append 638 w = msg.append
639 w('%r\n' % p) 639 if p:
640 w('followed by:\n') 640 w('%r\n' % p)
641 for i in range(5): 641 w('followed by:\n')
642 n = yacc.token() 642 for i in range(5):
643 if not n: 643 n = yacc.token()
644 break 644 if not n:
645 w(' %r\n' % n) 645 break
646 w(' %r\n' % n)
647 else:
648 w('Unexpected EOF')
646 raise sherrors.ShellSyntaxError(''.join(msg)) 649 raise sherrors.ShellSyntaxError(''.join(msg))
647 650
648# Build the parser 651# Build the parser