diff --git a/src/sixtypical/parser.py b/src/sixtypical/parser.py index 4b145c4..896a4c9 100644 --- a/src/sixtypical/parser.py +++ b/src/sixtypical/parser.py @@ -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) diff --git a/tests/SixtyPical Syntax.md b/tests/SixtyPical Syntax.md index ec8180d..3bae409 100644 --- a/tests/SixtyPical Syntax.md +++ b/tests/SixtyPical Syntax.md @@ -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 |