Fix parsing of memory accesses in tests
authorMichal Terepeta <michal.terepeta@gmail.com>
Sat, 27 Jun 2015 14:32:12 +0000 (16:32 +0200)
committerMichal Terepeta <michal.terepeta@gmail.com>
Tue, 30 Jun 2015 18:57:03 +0000 (20:57 +0200)
commit19526cc258a8bef851d828ad038a4a40ab5b3c06
tree20fc8c6db221095416a6b86928bdb6793f205c27
parentcda3ec8d331bbed7b2acfb30976f8930641a440b
Fix parsing of memory accesses in tests

Apparently the current parser would fail on any memory accesses, both
loads and stores. In case of the former it's enough to try parsing the
memory accesses before variables. For stores, we can use backtracking
so that we don't consume the initial "m" of memory assignemnt thinking
that it's a variable identifier.
testing/Main.hs
testing/Parse.hs
testing/tests/test5 [new file with mode: 0644]
testing/tests/test5.expected [new file with mode: 0644]