diff options
author | Adrian Thurston <thurston@complang.org> | 2015-11-30 16:26:39 -0500 |
---|---|---|
committer | Adrian Thurston <thurston@complang.org> | 2015-11-30 16:26:39 -0500 |
commit | 5e75abcbc165994b9c28fe98c1944da4ce31a7cb (patch) | |
tree | ef1fc4a4c275b4fe01a3458c5b4da2e348a42940 /src/compiler.cc | |
parent | dd66b443403b72ef2e2a076db471d6d819d95e05 (diff) | |
download | colm-5e75abcbc165994b9c28fe98c1944da4ce31a7cb.tar.gz |
allow omission of location in reductions
There is code in here for omission of location and data in reductions.
Unfortunately we cannot enable the omission of data unless we make changes to
the backtracking. In the current implementation we push the token data with an
mcopy from the data in the token.
Diffstat (limited to 'src/compiler.cc')
-rw-r--r-- | src/compiler.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler.cc b/src/compiler.cc index 6ee0d396..20e48038 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -1179,8 +1179,8 @@ void Compiler::prepGrammar() noUndefindLangEls(); /* Put the language elements in an index by language element id. */ - langElIndex = new LangEl*[nextSymbolId+1]; - memset( langElIndex, 0, sizeof(LangEl*)*(nextSymbolId+1) ); + langElIndex = new LangEl*[nextLelId+1]; + memset( langElIndex, 0, sizeof(LangEl*)*(nextLelId+1) ); for ( LelList::Iter lel = langEls; lel.lte(); lel++ ) langElIndex[lel->id] = lel; |