<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rep.git/grammar, branch 0.1.2</title>
<subtitle>Parser generator for Emacs written in Rust
</subtitle>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/'/>
<entry>
<title>Bump version number to 0.1.2</title>
<updated>2023-07-21T08:30:25+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-21T08:30:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=ffb6e689d28d295733b90f2b9e184205e33f19c2'/>
<id>ffb6e689d28d295733b90f2b9e184205e33f19c2</id>
<content type='text'>
I have fixed another bug and think that the version of a more stable
version is worth bumping the versions for.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I have fixed another bug and think that the version of a more stable
version is worth bumping the versions for.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add variations to the test</title>
<updated>2023-07-21T08:21:00+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-21T08:21:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=201830e33ab5c45044e960217e0ac8803e3e134d'/>
<id>201830e33ab5c45044e960217e0ac8803e3e134d</id>
<content type='text'>
Add an intentionally ambiguous grammar for testing purposes.

It seems to work fine.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add an intentionally ambiguous grammar for testing purposes.

It seems to work fine.
</pre>
</div>
</content>
</entry>
<entry>
<title>abnf: Correct error reports</title>
<updated>2023-07-21T08:19:04+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-21T08:19:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=1f010ad1aad8202828ab437ecaf1a635adda3c3f'/>
<id>1f010ad1aad8202828ab437ecaf1a635adda3c3f</id>
<content type='text'>
Previously the errors emitted while reading abnf grammars reported
incorrect indices.  Now this is fixed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously the errors emitted while reading abnf grammars reported
incorrect indices.  Now this is fixed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Derive Debug for a type</title>
<updated>2023-07-21T08:18:18+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-21T08:18:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=31c78b6eb965200ad177aed7b8d31f74559fab8c'/>
<id>31c78b6eb965200ad177aed7b8d31f74559fab8c</id>
<content type='text'>
This makes it easier if I want to debug things.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes it easier if I want to debug things.
</pre>
</div>
</content>
</entry>
<entry>
<title>grammar/label: `set_end_option`</title>
<updated>2023-07-21T03:40:15+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-21T03:40:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=f257f471f49bf13adf56868d8f8609309c7e100b'/>
<id>f257f471f49bf13adf56868d8f8609309c7e100b</id>
<content type='text'>
* grammar/src/label.rs (set_end_option): This function replaces the
  old function `open_end`, as this new function is more general than
  the old one, and there is no specific situation where we only need
  to open the end of a node without the need to close the node in an
  `if` statement.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* grammar/src/label.rs (set_end_option): This function replaces the
  old function `open_end`, as this new function is more general than
  the old one, and there is no specific situation where we only need
  to open the end of a node without the need to close the node in an
  `if` statement.
</pre>
</div>
</content>
</entry>
<entry>
<title>grammar/abnf: Fix a bug of repeatedly adding non-terminals</title>
<updated>2023-07-19T05:45:40+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-19T05:45:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=a9ce21b2ff3de3e063361e17961384ba0fe9d975'/>
<id>a9ce21b2ff3de3e063361e17961384ba0fe9d975</id>
<content type='text'>
This bug caused a plain unambiguous grammar to become ambiguous.

Funnily enough, this bug revealed a lot of bugs in the code for
handling forests.  I guess this is an unexpected surprise.  :D
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This bug caused a plain unambiguous grammar to become ambiguous.

Funnily enough, this bug revealed a lot of bugs in the code for
handling forests.  I guess this is an unexpected surprise.  :D
</pre>
</div>
</content>
</entry>
<entry>
<title>Finished the Emacs binding.</title>
<updated>2023-07-08T04:31:13+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-08T04:30:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=9a317e56f8a6126583f7d0c431bf878d9b1fe7b1'/>
<id>9a317e56f8a6126583f7d0c431bf878d9b1fe7b1</id>
<content type='text'>
Now the binding part is finished.

What remains is a bug encountered when planting a fragment to the
forest which intersects a packed node, which would lead to invalid
forests.  This will also cause problem when planting a packed
fragment, but until now my testing grammars do not produce packed
fragments, so this problem is not encountered yet.

I am still figuring out efficient ways to solve this problem.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now the binding part is finished.

What remains is a bug encountered when planting a fragment to the
forest which intersects a packed node, which would lead to invalid
forests.  This will also cause problem when planting a packed
fragment, but until now my testing grammars do not produce packed
fragments, so this problem is not encountered yet.

I am still figuring out efficient ways to solve this problem.
</pre>
</div>
</content>
</entry>
<entry>
<title>adding test grammar and test document</title>
<updated>2023-07-08T04:28:15+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-07-08T04:28:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=691f969eb104fa3d4c2a1667693fd0382eb9d6b5'/>
<id>691f969eb104fa3d4c2a1667693fd0382eb9d6b5</id>
<content type='text'>
Adding a grammar and a document for testing purposes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Adding a grammar and a document for testing purposes.
</pre>
</div>
</content>
</entry>
<entry>
<title>adjust autotools settings</title>
<updated>2023-06-18T08:26:46+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-06-18T08:26:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=3a4c22e931470fb1280ad0777e3a524b68314846'/>
<id>3a4c22e931470fb1280ad0777e3a524b68314846</id>
<content type='text'>
Add more directories under control of autotools.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add more directories under control of autotools.
</pre>
</div>
</content>
</entry>
<entry>
<title>fixed the bugs of node duplications and left-open nodes</title>
<updated>2023-06-18T07:03:34+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-06-18T07:03:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=a80db17473ff09cc72acba2c1975101e6dbedf39'/>
<id>a80db17473ff09cc72acba2c1975101e6dbedf39</id>
<content type='text'>
There were two main issues in the previous version.

One is that there are lots of duplications of nodes when manipulating
the forest.  This does not mean that labels repeat: by the use of the
data type this cannot happen.  What happened is that there were cloned
nodes whose children are exactly equal.  In this case there is no need
to clone that node in the first place.  This is now fixed by checking
carefully before cloning, so that we do not clone unnecessary nodes.

The other issue, which is perhaps more important, is that there are
nodes which are not closed.  This means that when there should be a
reuction of grammar rules, the forest does not mark the corresponding
node as already reduced.  The incorrect forests thus caused is hard to
fix: I tried several different approaches to fix it afterwards, but
all to no avail.  I also tried to record enough information to fix
these nodes during the manipulations.  It turned out that recording
nodes is a dead end, as I cannot properly syncronize the information
in the forest and the information in the chain-rule machine.  Any
inconsistencies will result in incorrect operations later on.

The approach I finally adapt is to perform every possible reduction at
each step.  This might lead to some more nodes than what we need.  But
those are technically expected to be there after all, and it is easy
to filter them out, so it is fine, from my point of view at the
moment.

Therefore, what remains is to filter those nodes out and connect it to
the holy Emacs.  :D
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There were two main issues in the previous version.

One is that there are lots of duplications of nodes when manipulating
the forest.  This does not mean that labels repeat: by the use of the
data type this cannot happen.  What happened is that there were cloned
nodes whose children are exactly equal.  In this case there is no need
to clone that node in the first place.  This is now fixed by checking
carefully before cloning, so that we do not clone unnecessary nodes.

The other issue, which is perhaps more important, is that there are
nodes which are not closed.  This means that when there should be a
reuction of grammar rules, the forest does not mark the corresponding
node as already reduced.  The incorrect forests thus caused is hard to
fix: I tried several different approaches to fix it afterwards, but
all to no avail.  I also tried to record enough information to fix
these nodes during the manipulations.  It turned out that recording
nodes is a dead end, as I cannot properly syncronize the information
in the forest and the information in the chain-rule machine.  Any
inconsistencies will result in incorrect operations later on.

The approach I finally adapt is to perform every possible reduction at
each step.  This might lead to some more nodes than what we need.  But
those are technically expected to be there after all, and it is easy
to filter them out, so it is fine, from my point of view at the
moment.

Therefore, what remains is to filter those nodes out and connect it to
the holy Emacs.  :D
</pre>
</div>
</content>
</entry>
</feed>
