Compare commits

...

2 Commits

Author SHA1 Message Date
14c0cb2760 README: add DMA counter syntax note 2023-08-24 05:46:40 +00:00
34f9859a6c lexer_iterator: delete dead code 2023-08-24 05:11:51 +00:00
2 changed files with 7 additions and 37 deletions

View File

@ -56,6 +56,11 @@ example as invalid: it misleads what the result of the operation is.
This change is consistent with what is written in the SCU manual This change is consistent with what is written in the SCU manual
(ST-97-R5-072694), but is inconsistent with SEGA's SCU DSP examples. (ST-97-R5-072694), but is inconsistent with SEGA's SCU DSP examples.
.. note::
It is currently unclear which of the two is correct. A future
version of scu-dsp-asm may change this behavior.
Differences that affect code generation Differences that affect code generation
======================================= =======================================
@ -85,8 +90,8 @@ In short:
Spurious invalid X-bus opcode generation Spurious invalid X-bus opcode generation
---------------------------------------- ----------------------------------------
Under seemly-random circumstances, ``dspasm.exe`` emits the undefined Under seemingly-random circumstances, ``dspasm.exe`` emits the
X-bus opcode ``001``. Given: undefined X-bus opcode ``001``. Given:
.. code:: .. code::

View File

@ -1,35 +0,0 @@
#include "lexer.hpp"
#include "token.hpp"
namespace dsp {
struct lexer_iterator_t
{
token_t previous_token;
token_t current_token;
lexer_t& lexer;
lexer_iterator_t(lexer_t& lexer)
: lexer(lexer), previous_token(lexer.scan_token()), current_token(previous_token)
{
}
token_t& advance()
{
previous_token = current_token;
current_token = lexer.scan_token();
return previous_token;
}
token_t& peek()
{
return current_token;
}
token_t& previous()
{
return previous_token;
}
};
}