Skip to content

Commit c3e51f0

Browse files
committed
fix typos
1 parent 6768049 commit c3e51f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ <h3><a name="data-structures">Data Structures</a></h3>
8686

8787
<code><pre>LR0 : { Rule rule, Integer dot }
8888
next_symbol(lr0) =
89-
if(lr0.dot &lt; lr0.rule.length) rule.production[rule.dot]</pre></code>
89+
if(lr0.dot &lt; lr0.rule.production.length) lr0.rule.production[lr0.dot]</pre></code>
9090

9191
<p>In this implementation we never use complete LR(0) items: we always
9292
promote them to a symbol so that all parse trees for a symbol will be
9393
combined under one Earley item no matter which production they derive
9494
from.</p>
9595

9696
<pre><code>advance(lr0) =
97-
if(lr0.dot == lr0.rule.length) lr0.rule.symbol
97+
if(lr0.dot == lr0.rule.production.length) lr0.rule.symbol
9898
else new LR0(lr0.rule, lr0.dot+1)</code></pre>
9999

100100
<p>Earley's algorithm works by keeping a table of all possible matches,
@@ -107,7 +107,7 @@ <h3><a name="data-structures">Data Structures</a></h3>
107107
matches) or an LR(0) item (for partial matches) plus references to the
108108
sets (and hence input positions) where the match starts and ends.</p>
109109

110-
<pre><code>Item : { Symbol | LR0 : tag, Set start, Set end }
110+
<pre><code>Item : { Symbol|LR0 tag, Set start, Set end }
111111

112112
Set : {
113113
Grammar grammar,

0 commit comments

Comments
 (0)