From f98536eef5b24bf98730c3b555aeb63ed9de0927 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Sun, 3 Oct 2010 10:49:42 +0000 Subject: SCI: Allow multiple word groups in parser In SCI01 and up, each typed word may be interpreted as multiple class,group pairs. This patch adds support to the vocabulary and parser. It uses the matcher support added in r52985. This fixes parser issues in German LSL3, but needs testing. svn-id: r52989 --- common/array.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common/array.h') diff --git a/common/array.h b/common/array.h index 4cc5369f9f..792a5ac5b2 100644 --- a/common/array.h +++ b/common/array.h @@ -150,6 +150,12 @@ public: insert_aux(_storage + idx, &element, &element + 1); } + void insert_at(int idx, const Array &array) { + assert(idx >= 0 && (uint)idx <= _size); + insert_aux(_storage + idx, array.begin(), array.end()); + } + + T remove_at(int idx) { assert(idx >= 0 && (uint)idx < _size); T tmp = _storage[idx]; -- cgit v1.2.3