<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rep.git/chain/src/grammar.rs, branch attempt1</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>structural change: separate crates out</title>
<updated>2023-01-03T15:44:02+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2023-01-03T15:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=bdbd4b4dc21af09711c97d3f903877443199af06'/>
<id>bdbd4b4dc21af09711c97d3f903877443199af06</id>
<content type='text'>
I put functionalities that are not strictly core to separate crates,
so that the whole package becomes more modular, and makes it easier to
try other parsing algorithms in the future.

Also I have to figure the forests out before finishing the core
chain-rule algorithm, as the part about forests affects the labels of
the grammars directly.  From my experiences in writing the previous
version, it is asking for trouble to change the labels type
dramatically at a later point: too many places need to be changed.
Thus I decide to figure the rough part of forests out.

Actually I only have to figure out how to attach forests fragments to
edges of the underlying atomic languages, and the more complex parts
of putting forests together can be left to the recorders, which is my
vision of assembling semi-ring values during the chain-rule machine.
It should be relatively easy to produce forests fragments from
grammars since we are just trying to extract some information from the
grammar, not to manipulate those information in some complicated way.
We have to do some manipulations in the process, though, in order to
make sure that the nulling and epsilon-removal processes do not
invalidate these fragments.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I put functionalities that are not strictly core to separate crates,
so that the whole package becomes more modular, and makes it easier to
try other parsing algorithms in the future.

Also I have to figure the forests out before finishing the core
chain-rule algorithm, as the part about forests affects the labels of
the grammars directly.  From my experiences in writing the previous
version, it is asking for trouble to change the labels type
dramatically at a later point: too many places need to be changed.
Thus I decide to figure the rough part of forests out.

Actually I only have to figure out how to attach forests fragments to
edges of the underlying atomic languages, and the more complex parts
of putting forests together can be left to the recorders, which is my
vision of assembling semi-ring values during the chain-rule machine.
It should be relatively easy to produce forests fragments from
grammars since we are just trying to extract some information from the
grammar, not to manipulate those information in some complicated way.
We have to do some manipulations in the process, though, in order to
make sure that the nulling and epsilon-removal processes do not
invalidate these fragments.
</pre>
</div>
</content>
</entry>
<entry>
<title>renaming core to chain and some other changes</title>
<updated>2022-12-22T16:36:31+00:00</updated>
<author>
<name>JSDurand</name>
<email>mmemmew@gmail.com</email>
</author>
<published>2022-12-22T16:36:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.jsdurand.xyz/rep.git/commit/?id=8463dd24f815fe2b8f25fe9763e0a43023bfbb20'/>
<id>8463dd24f815fe2b8f25fe9763e0a43023bfbb20</id>
<content type='text'>
Some changes:

- The core crate is renamed to "chain".

- The crate "viz" is added, which will provide layered graph drawing
  algorithms.

- A function is added to convert from a grammar to the regular
  language of its left-linear closures.

- A function is added to convert from a nondeterministic finite
  automaton to its "null" closure.  A null closure is the same
  automaton with edges added, as if some edges are "null".  Whether an
  edge is null is determined by a function.
  Combined with the previous change, we can convert a grammar to the
  regular language of the null closure of its left-linear closures.

---

Now it remains to test more grammars and add an Atom trait, before
finishing the part about compilations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Some changes:

- The core crate is renamed to "chain".

- The crate "viz" is added, which will provide layered graph drawing
  algorithms.

- A function is added to convert from a grammar to the regular
  language of its left-linear closures.

- A function is added to convert from a nondeterministic finite
  automaton to its "null" closure.  A null closure is the same
  automaton with edges added, as if some edges are "null".  Whether an
  edge is null is determined by a function.
  Combined with the previous change, we can convert a grammar to the
  regular language of the null closure of its left-linear closures.

---

Now it remains to test more grammars and add an Atom trait, before
finishing the part about compilations.
</pre>
</div>
</content>
</entry>
</feed>
