<feed xmlns='http://www.w3.org/2005/Atom'>
<title>parscan/codegen, branch main</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>chore: refactor some APIs</title>
<updated>2023-09-06T06:49:19+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-06T06:49:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=6dd78f44adf6fb032d0ecd9db813651b9524fcac'/>
<id>6dd78f44adf6fb032d0ecd9db813651b9524fcac</id>
<content type='text'>
The scanner returns a slice of pointers to tokens instead of a
slice of tokens. The parser now pass the initial node context.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The scanner returns a slice of pointers to tokens instead of a
slice of tokens. The parser now pass the initial node context.
</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>parser: skip comment modes</title>
<updated>2023-09-01T09:42:55+00:00</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-01T09:42:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=459eca16816023fb0afdd6e0948e5406d84e5bc5'/>
<id>459eca16816023fb0afdd6e0948e5406d84e5bc5</id>
<content type='text'>
Refctor node kind names by concatenating category and instance, to
allow better sorting. Comments are now parsed and skipped during
generation of AST.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refctor node kind names by concatenating category and instance, to
allow better sorting. Comments are now parsed and skipped during
generation of AST.
</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>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>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>
