A number of small script fixes/tweaks from usage
- Fixed prettyasserts.py parsing when '->' is in expr - Made prettyasserts.py failures not crash (yay dynamic typing) - Fixed the initial state of the emubd disk file to match the internal state in RAM - Fixed true/false getting changed to True/False in test.py/bench.py defines - Fixed accidental substring matching in plot.py's --by comparison - Fixed a missed LFS_BLOCk_CYCLES in test_superblocks.toml that was missed - Changed test.py/bench.py -v to only show commands being run Including the test output is still possible with test.py -v -O-, making the implicit inclusion redundant and noisy. - Added license comments to bench_runner/test_runner
This commit is contained in:
@@ -39,6 +39,7 @@ LEXEMES = {
|
||||
'cmp': CMP.keys(),
|
||||
'logic': ['\&\&', '\|\|'],
|
||||
'sep': [':', ';', '\{', '\}', ','],
|
||||
'op': ['->'], # specifically ops that conflict with cmp
|
||||
}
|
||||
|
||||
|
||||
@@ -330,7 +331,7 @@ def p_expr(p):
|
||||
except ParseFailure:
|
||||
p.pop(state)
|
||||
res.append(p.expect('assert'))
|
||||
elif p.accept('string', None, 'ws'):
|
||||
elif p.accept('string', 'op', 'ws', None):
|
||||
res.append(p.m)
|
||||
else:
|
||||
return ''.join(res)
|
||||
@@ -414,7 +415,8 @@ def main(input=None, output=None, pattern=[], limit=LIMIT):
|
||||
f.write(p.m)
|
||||
else:
|
||||
break
|
||||
except ParseFailure as f:
|
||||
except ParseFailure as e:
|
||||
print('warning: %s' % e)
|
||||
pass
|
||||
|
||||
for i in range(p.off, len(p.tokens)):
|
||||
|
||||
Reference in New Issue
Block a user