<feed xmlns='http://www.w3.org/2005/Atom'>
<title>parscan/codegen, branch main</title>
<subtitle>experimental interpreter
</subtitle>
<id>https://git.vertes.org/parscan/atom?h=main</id>
<link rel='self' href='https://git.vertes.org/parscan/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/'/>
<updated>2023-10-12T08:51:58Z</updated>
<entry>
<title>move to a direct byte code compiler (#8)</title>
<updated>2023-10-12T08:51:58Z</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-10-12T08:51:58Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=37b9da32d3b911091deb254f6cba2a137c471287'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>chore: refactor some APIs</title>
<updated>2023-09-06T06:49:19Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-06T06:49:19Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=6dd78f44adf6fb032d0ecd9db813651b9524fcac'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>codegen: add interpreter tests</title>
<updated>2023-09-04T14:58:15Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-04T14:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=4241593b42bffac2f8fcb63f1e88621fe025e360'/>
<id>urn:sha1:4241593b42bffac2f8fcb63f1e88621fe025e360</id>
<content type='text'>
Also simplify project structure. The executable is now produced in
the root directory. Work in progress.
</content>
</entry>
<entry>
<title>parser: skip comment modes</title>
<updated>2023-09-01T09:42:55Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-09-01T09:42:55Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=459eca16816023fb0afdd6e0948e5406d84e5bc5'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>codegen: fix interpreter re-entrance</title>
<updated>2023-08-31T15:53:54Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-31T15:53:54Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=851c793da43be9e4d3319afe440d603c85834045'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>gint: add an interactive REPL</title>
<updated>2023-08-29T16:22:13Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-29T16:22:13Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=0f4bfe6e70263fbeb580014b62632f403b29b414'/>
<id>urn:sha1:0f4bfe6e70263fbeb580014b62632f403b29b414</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore: appease lint and vet</title>
<updated>2023-08-25T09:21:49Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-25T09:21:49Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=a3ab9ef5be74cb54a87674aa48abb0c46f9c58f6'/>
<id>urn:sha1:a3ab9ef5be74cb54a87674aa48abb0c46f9c58f6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>codegen: add Interpreter struct</title>
<updated>2023-08-24T15:16:39Z</updated>
<author>
<name>Marc Vertes</name>
<email>mvertes@free.fr</email>
</author>
<published>2023-08-24T15:16:39Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=9fdef50606a2942389189cd61397e17c0a0ccfd7'/>
<id>urn:sha1:9fdef50606a2942389189cd61397e17c0a0ccfd7</id>
<content type='text'>
This makes the code easier to use.
</content>
</entry>
<entry>
<title>vm1: improve function calling (#6)</title>
<updated>2023-08-24T07:32:36Z</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-24T07:32:36Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=00cd63b47c0c32be821f80e006ed08ce57020e15'/>
<id>urn:sha1: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>
</entry>
<entry>
<title>codegen: add a bytecode generator (#5)</title>
<updated>2023-08-09T09:47:39Z</updated>
<author>
<name>Marc Vertes</name>
<email>marc.vertes@tendermint.com</email>
</author>
<published>2023-08-09T09:47:39Z</published>
<link rel='alternate' type='text/html' href='https://git.vertes.org/parscan/commit/?id=947873b34aabe46dfb9f8d06214736cb11b5a6b2'/>
<id>urn:sha1:947873b34aabe46dfb9f8d06214736cb11b5a6b2</id>
<content type='text'>
* codegen: add a bytecode generator
* cleaning scanner, parser and vm1.</content>
</entry>
</feed>
