1
0
mirror of https://github.com/catseye/SixtyPical.git synced 2024-11-25 23:49:17 +00:00

Vector tables can be parsed.

This commit is contained in:
Chris Pressey 2018-02-02 17:18:25 +00:00
parent b29716fccf
commit eb1974eb8a
2 changed files with 7 additions and 2 deletions

View File

@ -124,7 +124,11 @@ class Parser(object):
return TYPE_WORD
elif self.scanner.consume('vector'):
(inputs, outputs, trashes) = self.constraints()
return VectorType(inputs=inputs, outputs=outputs, trashes=trashes)
type_ = VectorType(inputs=inputs, outputs=outputs, trashes=trashes)
if self.scanner.consume('table'):
size = self.defn_size()
type_ = TableType(type_, size)
return type_
elif self.scanner.consume('buffer'):
size = self.defn_size()
return BufferType(size)

View File

@ -135,9 +135,10 @@ User-defined memory addresses of different types.
| byte byt
| word wor
| vector vec
| vector trashes a vec
| byte table[256] tab
| word table[256] wtab
| vector trashes a table[256] vtab
| buffer[2048] buf
| pointer ptr
|