Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tree construction in LL(1) and some fixed typos #44

Merged

Conversation

SurfaceYellowDuck
Copy link

@SurfaceYellowDuck SurfaceYellowDuck commented Mar 7, 2025

No description provided.

add example of buildig tree in LL algorithm and fixed typos

fix: actions
@@ -109,7 +109,8 @@ \section{LL(k)-алгоритм синтаксического анализа}
Пусть $G = \langle N, \Sigma, P, S \rangle$~--- КС-грамматика. Множество $\first[k]$ определено для сентенциальной формы $\alpha$ следующим образом:
\[ \first[k](\alpha) = \{ \omega \in \Sigma^* \mid \alpha \derives{} \omega \text{ и } |\omega| < k \text{ либо } \exists \beta: \alpha \derives{} \omega \beta \text{ и } |\omega| = k \}
\]
, где $\alpha, \beta \in (N \cup \Sigma)^*.$
, где $\alpha, \beta \in (N \cup \Sigma)^*.$ Это означает, что в общем случае $\alpha$ может быть как одиночным нетерминалом, так и произвольной цепочкой из смешанного алфавита.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ну это же очевидно из определения. Зачем ещё раз расписывать? Тем более, ещё и не совсем аккуртано.

@@ -166,6 +167,8 @@ \section{LL(k)-алгоритм синтаксического анализа}
\end{align*}
\end{multicols}

Как можно заметить, в примере поиска множества $\first$ в качестве аргумента функции передается нетерминал, но множество $\first$ ищется для правой части правила.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Что?) Опять же, фигня какая-то написана. В процедуре построения first всё расписано.

@gsvgit gsvgit merged commit 2a0dc09 into FormalLanguageConstrainedPathQuerying:dev Mar 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants