Skip to content

Commit 4fa841c

Browse files
committed
Better pictures in GLR
1 parent 917f1b4 commit 4fa841c

11 files changed

+173
-179
lines changed
Binary file not shown.

tex/FormalLanguageConstrainedReachabilityLectureNotes.tex

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@
105105

106106
\tikzstyle{r_state} = [shape=rectangle, draw, minimum size=0.2cm]
107107

108+
\tikzstyle{num_state} = [draw=none, fill=none, anchor=south west, red]
109+
108110
\tikzstyle{prod_node} = [shape=rectangle, draw, align=center]
109111

110112
\tikzset{
@@ -147,28 +149,28 @@
147149
\tableofcontents
148150
\newpage
149151
150-
\input{GLR-based_CFPQ}
151-
152-
% \input{List_of_contributors}
153-
% \input{Introduction}
154-
% %\input{LinearAlgebra}
155-
% \input{GraphTheoryIntro}
156-
% \input{FormalLanguageTheoryIntro}
157-
% \input{FLPQ}
158-
% %\input{RegularLanguages}
159-
% \input{Context-Free_Languages}
160-
% \input{CYK_for_CFPQ}
161-
% \input{Matrix-based_CFPQ}
162-
% \input{TensorProduct}
163-
% \input{SPPF}
164-
% \input{GLL-based_CFPQ}
165152
% \input{GLR-based_CFPQ}
166-
% %\input{CombinatorsForCFPQ}
167-
% %\input{DerivativesForCFPQ}
168-
% %\input{CFPQ_to_Datalog}
169-
% %\input{Multiple_Context-Free_Languages}
170-
% %\input{ConjunctiveAndBooleanLanguages}
171-
% %\input{Conclusion}
153+
154+
\input{List_of_contributors}
155+
\input{Introduction}
156+
%\input{LinearAlgebra}
157+
\input{GraphTheoryIntro}
158+
\input{FormalLanguageTheoryIntro}
159+
\input{FLPQ}
160+
%\input{RegularLanguages}
161+
\input{Context-Free_Languages}
162+
\input{CYK_for_CFPQ}
163+
\input{Matrix-based_CFPQ}
164+
\input{TensorProduct}
165+
\input{SPPF}
166+
\input{GLL-based_CFPQ}
167+
\input{GLR-based_CFPQ}
168+
%\input{CombinatorsForCFPQ}
169+
%\input{DerivativesForCFPQ}
170+
%\input{CFPQ_to_Datalog}
171+
%\input{Multiple_Context-Free_Languages}
172+
%\input{ConjunctiveAndBooleanLanguages}
173+
%\input{Conclusion}
172174
173175
\bibliographystyle{abbrv}
174176
\bibliography{FormalLanguageConstrainedReachabilityLectureNotes}

tex/GLR-based_CFPQ.tex

Lines changed: 13 additions & 130 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ \section{Восходящий синтаксический анализ}
1818

1919
\begin{center}
2020
\begin{tabular}{c||c|c|c|c|c||c|c|c|c}
21-
States & $t_0$ &$\dots$ & $t_a$ & $\dots$ & \$ & $N_0$ &$\dots$ & $N_b$ & $\dots$ \\ \hline
21+
States & $t_0$ &$\dots$ & $t_a$ & $\dots$ & \$ & $N_0$ &$\dots$ & $N_b$ & $\dots$ \\ \hline \hline
2222
$\dots$ & $\dots$ &$\dots$ & $\dots$ & $\dots$ & $\dots$ & $\dots$ &$\dots$ & $\dots$ & $\dots$ \\ \hline
2323
$10$ & $\dots$ &$\dots$ & $s_i$ & $\dots$ & $r_k$ & $\dots$ &$\dots$ & $j$ & $\dots$ \\ \hline
2424
$\dots$ & $\dots$ &$\dots$ & $\dots$ & $\dots$ & $acc$ & $\dots$ &$\dots$ & $\dots$ & $\dots$
@@ -211,16 +211,16 @@ \subsection{Примеры}
211211
\begin{example}
212212
Пример управляющей LR(0) таблицы.
213213

214-
\begin{tabular}{|c|c|c|c||c|}
215-
\hline & a & b & \$ & S \\ [0.5ex]
214+
\begin{tabular}{c||c|c|c||c}
215+
& a & b & \$ & S \\ \hline
216216
\hline 0 & $s_3$, $r_1$ & $r_1$ & $r_1$ & 1 \\
217217
\hline 1 & & & acc & \\
218218
\hline 2 & $r_2$ & $r_2$ & $r_2$ & \\
219219
\hline 3 & $s_3$, $r_1$ & $r_1$ & $r_1$ & 4 \\
220220
\hline 4 & & $s_5$ & & \\
221221
\hline 5 & $s_3, r_1$ & $r_1$ & $r_1$ & 6 \\
222-
\hline 6 & $r_0$ & $r_0$ & $r_0$ & \\ [1ex]
223-
\hline
222+
\hline 6 & $r_0$ & $r_0$ & $r_0$ &
223+
224224
\end{tabular}
225225

226226
Как видим, в данном случае в таблице присутствуют shift-reduce конфликты. В случае, когда не удаётся построить таблицу без конфликтов, говорят, что грамматика не LR(0).
@@ -236,16 +236,15 @@ \subsection{Примеры}
236236
\textit{FOLLOW}_1(S) = \{b, \$\}
237237
$$
238238

239-
\begin{tabular}{|c|c|c|c||c|}
240-
\hline & a & b & \$ & S \\ [0.5ex]
239+
\begin{tabular}{c||c|c|c||c}
240+
& a & b & \$ & S \\ \hline
241241
\hline 0 & $s_3$ & $r_1$ & $r_1$ & 1 \\
242242
\hline 1 & & & acc & \\
243243
\hline 2 & & & & \\
244244
\hline 3 & $s_3$ & $r_1$ & $r_1$ & 4 \\
245245
\hline 4 & & $s_5$ & & \\
246246
\hline 5 & $s_3$ & $r_1$ & $r_1$ & 6 \\
247247
\hline 6 & & $r_0$ & $r_0$ & \\ [1ex]
248-
\hline
249248
\end{tabular}
250249

251250
В данном случае в таблице отсутствуют shift-reduce конфликты. То есть наша грамматика SLR(1), но не LR(0).
@@ -421,138 +420,22 @@ \subsection{Классический GLR алгоритм}
421420

422421
Построим для данной грамматики LR автомат:
423422

424-
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
425-
%uncomment if require: \path (0,306); %set diagram left start at 0, and has height of 306
426-
427-
428-
% Text Node
429-
\draw (21.5,33) .. controls (21.5,30.24) and (23.74,28) .. (26.5,28) -- (94.5,28) .. controls (97.26,28) and (99.5,30.24) .. (99.5,33) -- (99.5,89) .. controls (99.5,91.76) and (97.26,94) .. (94.5,94) -- (26.5,94) .. controls (23.74,94) and (21.5,91.76) .. (21.5,89) -- cycle ;
430-
\draw (60.5,61) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$ \begin{array}{l}
431-
S'\rightarrow .S\$\\
432-
S\rightarrow .abC\\
433-
S\rightarrow .aBC
434-
\end{array}$};
435-
% Text Node
436-
\draw (25,141) .. controls (25,138.24) and (27.24,136) .. (30,136) -- (91,136) .. controls (93.76,136) and (96,138.24) .. (96,141) -- (96,156) .. controls (96,158.76) and (93.76,161) .. (91,161) -- (30,161) .. controls (27.24,161) and (25,158.76) .. (25,156) -- cycle ;
437-
\draw (60.5,148.5) node {$S'\rightarrow S.\$$};
438-
% Text Node
439-
\draw (446,39) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$5$};
440-
% Text Node
441-
\draw (93,18) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$0$};
442-
% Text Node
443-
\draw (213,18) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$2$};
444-
% Text Node
445-
\draw (89,126) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$1$};
446-
% Text Node
447-
\draw (330,18) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$3$};
448-
% Text Node
449-
\draw (212,117) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$4$};
450-
% Text Node
451-
\draw (141.5,33) .. controls (141.5,30.24) and (143.74,28) .. (146.5,28) -- (214.5,28) .. controls (217.26,28) and (219.5,30.24) .. (219.5,33) -- (219.5,89) .. controls (219.5,91.76) and (217.26,94) .. (214.5,94) -- (146.5,94) .. controls (143.74,94) and (141.5,91.76) .. (141.5,89) -- cycle ;
452-
\draw (180.5,61) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$ \begin{array}{l}
453-
S\rightarrow a.BC\\
454-
S\rightarrow a.bC\\
455-
B\rightarrow .b
456-
\end{array}$};
457-
% Text Node
458-
\draw (121,51) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$a$};
459-
% Text Node
460-
\draw (261.5,33) .. controls (261.5,30.24) and (263.74,28) .. (266.5,28) -- (332.5,28) .. controls (335.26,28) and (337.5,30.24) .. (337.5,33) -- (337.5,89) .. controls (337.5,91.76) and (335.26,94) .. (332.5,94) -- (266.5,94) .. controls (263.74,94) and (261.5,91.76) .. (261.5,89) -- cycle ;
461-
\draw (299.5,61) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$ \begin{array}{l}
462-
S\rightarrow ab.C\\
463-
B\rightarrow b.\\
464-
C\rightarrow .c
465-
\end{array}$};
466-
% Text Node
467-
\draw (25,209) .. controls (25,206.24) and (27.24,204) .. (30,204) -- (91,204) .. controls (93.76,204) and (96,206.24) .. (96,209) -- (96,224) .. controls (96,226.76) and (93.76,229) .. (91,229) -- (30,229) .. controls (27.24,229) and (25,226.76) .. (25,224) -- cycle ;
468-
\draw (60.5,216.5) node {$S'\rightarrow S\$.$};
469-
% Text Node
470-
\draw (69,111) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$S$};
471-
% Text Node
472-
\draw (69,178) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$\$$};
473-
% Text Node
474-
\draw (378,53.5) .. controls (378,50.74) and (380.24,48.5) .. (383,48.5) -- (449,48.5) .. controls (451.76,48.5) and (454,50.74) .. (454,53.5) -- (454,68.5) .. controls (454,71.26) and (451.76,73.5) .. (449,73.5) -- (383,73.5) .. controls (380.24,73.5) and (378,71.26) .. (378,68.5) -- cycle ;
475-
\draw (416,61) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$S\rightarrow abC.$};
476-
% Text Node
477-
\draw (240,51) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$b$};
478-
% Text Node
479-
\draw (356,51) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$C$};
480-
% Text Node
481-
\draw (142,132) .. controls (142,129.24) and (144.24,127) .. (147,127) -- (215,127) .. controls (217.76,127) and (220,129.24) .. (220,132) -- (220,167) .. controls (220,169.76) and (217.76,172) .. (215,172) -- (147,172) .. controls (144.24,172) and (142,169.76) .. (142,167) -- cycle ;
482-
\draw (181,149.5) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$ \begin{array}{l}
483-
S\rightarrow aB.C\\
484-
C\rightarrow .c
485-
\end{array}$};
486-
% Text Node
487-
\draw (142,210) .. controls (142,207.24) and (144.24,205) .. (147,205) -- (215,205) .. controls (217.76,205) and (220,207.24) .. (220,210) -- (220,225) .. controls (220,227.76) and (217.76,230) .. (215,230) -- (147,230) .. controls (144.24,230) and (142,227.76) .. (142,225) -- cycle ;
488-
\draw (181,217.5) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$S\rightarrow aBC.$};
489-
% Text Node
490-
\draw (271,142) .. controls (271,139.24) and (273.24,137) .. (276,137) -- (324,137) .. controls (326.76,137) and (329,139.24) .. (329,142) -- (329,157) .. controls (329,159.76) and (326.76,162) .. (324,162) -- (276,162) .. controls (273.24,162) and (271,159.76) .. (271,157) -- cycle ;
491-
\draw (300,149.5) node [color={rgb, 255:red, 62; green, 45; blue, 45 } ,opacity=1 ] {$C\rightarrow c.$};
492-
% Text Node
493-
\draw (247,139) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$c$};
494-
% Text Node
495-
\draw (308,111) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$c$};
496-
% Text Node
497-
\draw (190,184) node [scale=0.9,color={rgb, 255:red, 0; green, 0; blue, 0 } ,opacity=1 ] {$C$};
498-
% Text Node
499-
\draw (322,127) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$6$};
500-
% Text Node
501-
\draw (213,195) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$7$};
502-
% Text Node
503-
\draw (84.5,194) node [scale=0.9,color={rgb, 255:red, 255; green, 0; blue, 0 } ,opacity=1 ] {$acc$};
504-
% Connection
505-
\draw (99.5,61) -- (139.5,61) ;
506-
\draw [shift={(141.5,61)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
507-
508-
% Connection
509-
\draw (60.5,94) -- (60.5,134) ;
510-
\draw [shift={(60.5,136)}, rotate = 270] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
511-
512-
% Connection
513-
\draw (60.5,161) -- (60.5,202) ;
514-
\draw [shift={(60.5,204)}, rotate = 270] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
515-
516-
% Connection
517-
\draw (219.5,61) -- (259.5,61) ;
518-
\draw [shift={(261.5,61)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
519-
520-
% Connection
521-
\draw (337.5,61) -- (376,61) ;
522-
\draw [shift={(378,61)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
523-
524-
% Connection
525-
\draw (180.69,94) -- (180.86,125) ;
526-
\draw [shift={(180.87,127)}, rotate = 269.68] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
527-
528-
% Connection
529-
\draw (181,172) -- (181,203) ;
530-
\draw [shift={(181,205)}, rotate = 270] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
531-
532-
% Connection
533-
\draw (299.69,94) -- (299.92,135) ;
534-
\draw [shift={(299.93,137)}, rotate = 269.68] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
535-
536-
% Connection
537-
\draw (220,149.5) -- (269,149.5) ;
538-
\draw [shift={(271,149.5)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 } ][line width=0.75] (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29) ;
539-
540-
541-
\end{tikzpicture}
423+
\begin{center}
424+
\input{figures/GLR/GLR_example.tex}
425+
\end{center}
542426

543427
И управляющую таблицу:
544428

545-
\begin{tabular}{|c|c|c|c|c||c|c|c|}
546-
\hline & a & b & c & \$ & B & C & S \\ [0.5ex]
429+
\begin{tabular}{c||c|c|c|c||c|c|c}
430+
& a & b & c & \$ & B & C & S \\ \hline
547431
\hline 0 & $s_2$ & & & & & 1 & \\
548432
\hline 1 & & & & acc & & & \\
549433
\hline 2 & & $s_3$ & & & 4 & & \\
550434
\hline 3 & & & $s_6$, $r_3$ & & & 5 & \\
551435
\hline 4 & & & $s_6$ & & & 7 & \\
552436
\hline 5 & & & & $r_1$ & & & \\
553437
\hline 6 & & & & $r_4$ & & & \\
554-
\hline 7 & & & & $r_2$ & & & \\ [1ex]
555-
\hline
438+
\hline 7 & & & & $r_2$ & & &
556439
\end{tabular}
557440

558441
Разберем слово $w$ с помощью алгоритма GLR. Использована следующая аннотация: вершины-состояния обозначены кругами, вершины-символы --- прямоугольниками.

tex/figures/GLR/GLR_example.tex

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
\begin{tikzpicture}[> = stealth,node distance=1.25cm, on grid, scale=0.8, every node/.style={scale=0.8}]
2+
\node[r_state] (s_0)
3+
{
4+
$
5+
\begin{aligned}
6+
S' &\to \cdot S \$ \\
7+
S &\to \cdot a b C \\
8+
S &\to \cdot a B C
9+
\end{aligned}
10+
$
11+
};
12+
\node[r_state] (s_1) [below=2.5cm of s_0]
13+
{
14+
$ S' \to S \cdot \$ $
15+
};
16+
\node[r_state] (s_acc) [below=2cm of s_1]
17+
{
18+
$ S' \to S \$ \cdot $
19+
};
20+
\node[r_state] (s_2) [right=3cm of s_0]
21+
{
22+
$
23+
\begin{aligned}
24+
S &\to a \cdot B C \\
25+
S &\to a \cdot b C \\
26+
B &\to \cdot b
27+
\end{aligned}
28+
$
29+
};
30+
31+
\node[r_state] (s_3) [right=3cm of s_2]
32+
{
33+
$
34+
\begin{aligned}
35+
S &\to a b \cdot C \\
36+
B &\to b \cdot \\
37+
C &\to \cdot c
38+
\end{aligned}
39+
$
40+
};
41+
42+
\node[r_state] (s_5) [right=3cm of s_3]
43+
{
44+
$
45+
\begin{aligned}
46+
S &\to a b C \cdot
47+
\end{aligned}
48+
$
49+
};
50+
51+
\node[r_state] (s_4) [below=2.5cm of s_2]
52+
{
53+
$
54+
\begin{aligned}
55+
S &\to a B \cdot C \\
56+
C &\to \cdot c
57+
\end{aligned}
58+
$
59+
};
60+
61+
\node[r_state] (s_6) [right=3cm of s_4]
62+
{
63+
$
64+
\begin{aligned}
65+
C &\to c \cdot
66+
\end{aligned}
67+
$
68+
};
69+
70+
\node[r_state] (s_7) [below=2cm of s_4]
71+
{
72+
$
73+
\begin{aligned}
74+
S &\to a B C \cdot
75+
\end{aligned}
76+
$
77+
};
78+
79+
\node[num_state] at (s_0.north west) {0};
80+
\node[num_state] at (s_1.north west) {1};
81+
\node[num_state] at (s_2.north west) {2};
82+
\node[num_state] at (s_3.north west) {3};
83+
\node[num_state] at (s_4.north west) {4};
84+
\node[num_state] at (s_5.north west) {5};
85+
\node[num_state] at (s_6.north west) {6};
86+
\node[num_state] at (s_7.north west) {7};
87+
\node[num_state] at (s_acc.north west) {acc};
88+
89+
90+
\path[->]
91+
(s_0) edge [above] node {$a$} (s_2)
92+
edge [right] node {$S$} (s_1)
93+
(s_1) edge [right] node {$\$$} (s_acc)
94+
(s_2) edge [above] node {$b$} (s_3)
95+
edge [right] node {$B$} (s_4)
96+
(s_3) edge [above] node {$C$} (s_5)
97+
edge [right] node {$c$} (s_6)
98+
(s_4) edge [above] node {$c$} (s_6)
99+
edge [right] node {$C$} (s_7)
100+
;
101+
\end{tikzpicture}

tex/figures/GLR/LR0/complete.tex

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
\begin{tikzpicture}[> = stealth,node distance=3.25cm, on grid, scale=0.8, every node/.style={scale=0.8}]
2-
\node[draw=none, fill=none] at (-1.4, 1.2) {0};
3-
\node[draw=none, fill=none] at (3.1, 0.55) {1};
4-
\node[draw=none, fill=none] at (7.1, 0.55) {2};
5-
\node[draw=none, fill=none] at (-1.4, -1.8) {3};
6-
\node[draw=none, fill=none] at (2.9, -2.5) {4};
7-
\node[draw=none, fill=none] at (6.7, -1.8) {5};
8-
\node[draw=none, fill=none] at (11, -2.5) {6};
92
\node[r_state] (s_0)
103
{
114
$
@@ -53,6 +46,14 @@
5346
$ S \to a S b S \cdot$
5447
};
5548

49+
\node[num_state] at (s_0.north west) {0};
50+
\node[num_state] at (s_1.north west) {1};
51+
\node[num_state] at (s_2.north west) {2};
52+
\node[num_state] at (s_3.north west) {3};
53+
\node[num_state] at (s_4.north west) {4};
54+
\node[num_state] at (s_5.north west) {5};
55+
\node[num_state] at (s_6.north west) {6};
56+
5657
\path[->]
5758
(s_0) edge [left] node {$a$} (s_3)
5859
edge [above] node {$S$} (s_1)

tex/figures/GLR/LR0/state0.tex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
\begin{tikzpicture}[> = stealth,node distance=3.25cm, on grid, scale=0.8, every node/.style={scale=0.8}]
2-
\node[draw=none, fill=none] at (-1.4, 1.2) {0};
32
\node[r_state] (s_0)
43
{
54
$
@@ -10,4 +9,6 @@
109
\end{aligned}
1110
$
1211
};
12+
13+
\node[num_state] at (s_0.north west) {0};
1314
\end{tikzpicture}

0 commit comments

Comments
 (0)