<feed xmlns='http://www.w3.org/2005/Atom'>
<title>parscan/vm1, branch parscan-struct</title>
<subtitle>experimental interpreter
</subtitle>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/'/>
<entry>
<title>move to a direct byte code compiler (#8)</title>
<updated>2023-10-12T08:51:58+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-10-12T08:51:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=37b9da32d3b911091deb254f6cba2a137c471287'/>
<id>37b9da32d3b911091deb254f6cba2a137c471287</id>
<content type='text'>
* chore: refactor to keep only the new parser and bytecode vm

* scanner: remove Token.value field

* scanner: remove scanner.kind field

* chore: move language specification in lang package

This avoid a cyclic dependency in scanner_test which can now use
the golang/GoSpec language specification for Go.

* clean code

* scanner: export scanner fields

Also parser now generate function calls, including externals.

* chore: fix lint issues

* parser: handle strings

* wip

* parser: implement support for 'if, else, else if' statements

Resolving labels in the compiler still in progress.

* parser: support if statements, improve compiler

* improve handling of functions

* improve support of local variables

* scanner: trim leading and trailing spaces

* fixes to make fibonacci work

* parser: improve README, fix function parameters parsing</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* chore: refactor to keep only the new parser and bytecode vm

* scanner: remove Token.value field

* scanner: remove scanner.kind field

* chore: move language specification in lang package

This avoid a cyclic dependency in scanner_test which can now use
the golang/GoSpec language specification for Go.

* clean code

* scanner: export scanner fields

Also parser now generate function calls, including externals.

* chore: fix lint issues

* parser: handle strings

* wip

* parser: implement support for 'if, else, else if' statements

Resolving labels in the compiler still in progress.

* parser: support if statements, improve compiler

* improve handling of functions

* improve support of local variables

* scanner: trim leading and trailing spaces

* fixes to make fibonacci work

* parser: improve README, fix function parameters parsing</pre>
</div>
</content>
</entry>
<entry>
<title>codegen: add interpreter tests</title>
<updated>2023-09-04T14:58:15+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-04T14:58:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=4241593b42bffac2f8fcb63f1e88621fe025e360'/>
<id>4241593b42bffac2f8fcb63f1e88621fe025e360</id>
<content type='text'>
Also simplify project structure. The executable is now produced in
the root directory. Work in progress.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also simplify project structure. The executable is now produced in
the root directory. Work in progress.
</pre>
</div>
</content>
</entry>
<entry>
<title>codegen: fix interpreter re-entrance</title>
<updated>2023-08-31T15:53:54+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-31T15:53:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=851c793da43be9e4d3319afe440d603c85834045'/>
<id>851c793da43be9e4d3319afe440d603c85834045</id>
<content type='text'>
So multiple successive incremental Evals function correctly.

Also improve the following:
- Apply the same Eval API to vm0 and vm1
- parser: dot diagram display is now synchronous
- codegen: outsource complex code generation for readability
- vm1: Pop take the number of values to pop as operand
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So multiple successive incremental Evals function correctly.

Also improve the following:
- Apply the same Eval API to vm0 and vm1
- parser: dot diagram display is now synchronous
- codegen: outsource complex code generation for readability
- vm1: Pop take the number of values to pop as operand
</pre>
</div>
</content>
</entry>
<entry>
<title>gint: add an interactive REPL</title>
<updated>2023-08-29T16:22:13+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-29T16:22:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=0f4bfe6e70263fbeb580014b62632f403b29b414'/>
<id>0f4bfe6e70263fbeb580014b62632f403b29b414</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>chore: appease lint and vet</title>
<updated>2023-08-25T09:21:49+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-25T09:21:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=a3ab9ef5be74cb54a87674aa48abb0c46f9c58f6'/>
<id>a3ab9ef5be74cb54a87674aa48abb0c46f9c58f6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>codegen: add Interpreter struct</title>
<updated>2023-08-24T15:16:39+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-24T15:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=9fdef50606a2942389189cd61397e17c0a0ccfd7'/>
<id>9fdef50606a2942389189cd61397e17c0a0ccfd7</id>
<content type='text'>
This makes the code easier to use.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes the code easier to use.
</pre>
</div>
</content>
</entry>
<entry>
<title>Update README.md</title>
<updated>2023-08-24T07:36:16+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-24T07:36:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=9146b90fe74f9615b1f4ab9a340ec038e0bd2264'/>
<id>9146b90fe74f9615b1f4ab9a340ec038e0bd2264</id>
<content type='text'>
fix diagram</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
fix diagram</pre>
</div>
</content>
</entry>
<entry>
<title>vm1: improve function calling (#6)</title>
<updated>2023-08-24T07:32:36+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-24T07:32:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=00cd63b47c0c32be821f80e006ed08ce57020e15'/>
<id>00cd63b47c0c32be821f80e006ed08ce57020e15</id>
<content type='text'>
The "Enter" instruction has been removed and the frame pointer is
now saved by the "Call" instruction.

The "Return" instruction now takes the number of function input
parameters as the second operand. It's used to return the output
values at the correct place in the caller frame, no matter the
number of input parameters.

The tests and the code generator have been updated accordingly.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The "Enter" instruction has been removed and the frame pointer is
now saved by the "Call" instruction.

The "Return" instruction now takes the number of function input
parameters as the second operand. It's used to return the output
values at the correct place in the caller frame, no matter the
number of input parameters.

The tests and the code generator have been updated accordingly.</pre>
</div>
</content>
</entry>
<entry>
<title>scanner: handle long string delimiters (#7)</title>
<updated>2023-08-24T07:31:14+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-24T07:31:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=c83cdc374f8d50189c2da3460a6db94a4527c1fc'/>
<id>c83cdc374f8d50189c2da3460a6db94a4527c1fc</id>
<content type='text'>
* scanner: handle long string delimiters

Strings now can be delimited by arbitrary sequences of characters.
It is also possible to exclude the end delimiter, as for example
required for `//` C or Go comments.

* scanner: fix handling strings within blocks</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* scanner: handle long string delimiters

Strings now can be delimited by arbitrary sequences of characters.
It is also possible to exclude the end delimiter, as for example
required for `//` C or Go comments.

* scanner: fix handling strings within blocks</pre>
</div>
</content>
</entry>
<entry>
<title>codegen: add a bytecode generator (#5)</title>
<updated>2023-08-09T09:47:39+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-09T09:47:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=947873b34aabe46dfb9f8d06214736cb11b5a6b2'/>
<id>947873b34aabe46dfb9f8d06214736cb11b5a6b2</id>
<content type='text'>
* codegen: add a bytecode generator
* cleaning scanner, parser and vm1.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* codegen: add a bytecode generator
* cleaning scanner, parser and vm1.</pre>
</div>
</content>
</entry>
</feed>
