Skip to content

Commit 34c3572

Browse files
committed
Черновик раздела про комбинаторы парсеров.
1 parent 7ba44ae commit 34c3572

5 files changed

Lines changed: 147 additions & 27 deletions

File tree

book_structure.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,13 @@
122122
- ⚠️ Подраздел "CLR(1) алгоритм"
123123
- ⚠️ Подраздел "Обобщённый LR алгоритм"
124124
- ⚠️ Раздел "Сравнение классов LL и LR" — `06_LLvsLR.tex`
125-
- ❌ Раздел "Комбинаторы парсеров" — `07_Combinators.tex`
125+
- ⚠️ Раздел "Комбинаторы парсеров" — `07_Combinators.tex`
126+
- ⚠️ Вводная часть: комбинаторы как библиотечный подход к синтаксическому анализу
127+
- ⚠️ Подраздел "Базовые парсеры и комбинаторы": примитивы, последовательность, альтернатива, повторение, преобразование результата
128+
- ⚠️ Подраздел "Семантические действия и типы": построение значений при разборе и статическая проверка типов
129+
- ⚠️ Подраздел "Аппликативные, монадические и селективные комбинаторы": выразительность, статический анализ, Parsley
130+
- ⚠️ Подраздел "Левая рекурсия, неоднозначность и мемоизация": packrat, Meerkat, связь с GLL и SPPF
131+
- ⚠️ Подраздел "Преимущества и ограничения": композиционность, встраивание, производительность, сообщения об ошибках
126132

127133
### Глава 8. Многокомпонентные контекстно-свободные языки — `tex/part_02_Foundations/chapter_08_MCFG/main.tex` — ⚠️
128134

glossary.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,12 @@
5353
- Поиск путей из множества источников --- Multiple-source path querying
5454
- Встроенная процедура --- Stored procedure
5555
- Cypher --- Cypher
56+
- Комбинаторы парсеров --- Parser combinators
57+
- Семантическое действие --- Semantic action
58+
- Мемоизация --- Memoization
59+
- Левая рекурсия --- Left recursion
60+
- Аппликативные комбинаторы парсеров --- Applicative parser combinators
61+
- Монадические комбинаторы парсеров --- Monadic parser combinators
5662

5763
# Сокращения (расшифровка --- сокращение)
5864
- Graph Structured Stack --- GSS

tex/FormalLanguageConstrainedReachabilityLectureNotes.bib

Lines changed: 36 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,11 +1212,11 @@ @article{Hemerik2009
12121212
publisher = {LATA}
12131213
}
12141214
@misc{ISO14977,
1215-
title = {{ISO/IEC 14977:1996} --- Information technology --- Syntactic metalanguage --- Extended BNF},
1216-
author = {{ISO/IEC}},
1217-
year = {1996},
1218-
publisher = {International Organization for Standardization},
1219-
address = {Geneva, CH}
1215+
title = {{ISO/IEC 14977:1996} --- Information technology --- Syntactic metalanguage --- Extended BNF},
1216+
author = {{ISO/IEC}},
1217+
year = {1996},
1218+
publisher = {International Organization for Standardization},
1219+
address = {Geneva, CH}
12201220
}
12211221

12221222
@inproceedings{tomita1988graph,
@@ -1850,21 +1850,21 @@ @inproceedings{Terekhov2021MultipleSourceCP
18501850
}
18511851

18521852
@article{hellingsPathQuerying,
1853-
title = {Querying for Paths in Graphs using Context-Free Path Queries},
1854-
author = {Hellings, Jelle},
1855-
journal = {arXiv preprint arXiv:1502.02242},
1856-
year = {2015}
1853+
title = {Querying for Paths in Graphs using Context-Free Path Queries},
1854+
author = {Hellings, Jelle},
1855+
journal = {arXiv preprint arXiv:1502.02242},
1856+
year = {2015}
18571857
}
18581858

18591859
@article{DBLP:journals/corr/Hellings15,
1860-
author = {Jelle Hellings},
1861-
title = {Path Results for Context-free Grammar Queries on Graphs},
1862-
journal = {CoRR},
1863-
volume = {abs/1502.02242},
1864-
year = {2015},
1865-
url = {http://arxiv.org/abs/1502.02242},
1866-
archivePrefix = {arXiv},
1867-
eprint = {1502.02242}
1860+
author = {Jelle Hellings},
1861+
title = {Path Results for Context-free Grammar Queries on Graphs},
1862+
journal = {CoRR},
1863+
volume = {abs/1502.02242},
1864+
year = {2015},
1865+
url = {http://arxiv.org/abs/1502.02242},
1866+
archiveprefix = {arXiv},
1867+
eprint = {1502.02242}
18681868
}
18691869

18701870
@inproceedings{10.1007/978-3-319-91662-0_17,
@@ -2319,3 +2319,22 @@ @article{10.1145/3704854
23192319
numpages = {30},
23202320
keywords = {static analysis, CFL reachability, Dyck reachability, context-sensitive languages}
23212321
}
2322+
2323+
@article{10.1145/3409002,
2324+
author = {Willis, Jamie and Wu, Nicolas and Pickering, Matthew},
2325+
title = {Staged selective parser combinators},
2326+
year = {2020},
2327+
issue_date = {August 2020},
2328+
publisher = {Association for Computing Machinery},
2329+
address = {New York, NY, USA},
2330+
volume = {4},
2331+
number = {ICFP},
2332+
url = {https://doi.org/10.1145/3409002},
2333+
doi = {10.1145/3409002},
2334+
abstract = {Parser combinators are a middle ground between the fine control of hand-rolled parsers and the high-level almost grammar-like appearance of parsers created via parser generators. They also promote a cleaner, compositional design for parsers. Historically, however, they cannot match the performance of their counterparts. This paper describes how to compile parser combinators into parsers of hand-written quality. This is done by leveraging the static information present in the grammar by representing it as a tree. However, in order to exploit this information, it will be necessary to drop support for monadic computation since this generates dynamic structure. Selective functors can help recover lost functionality in the absence of monads, and the parser tree can be partially evaluated with staging. This is implemented in a library called Parsley.},
2335+
journal = {Proc. ACM Program. Lang.},
2336+
month = aug,
2337+
articleno = {120},
2338+
numpages = {30},
2339+
keywords = {parsers, meta-programming, combinators}
2340+
}

0 commit comments

Comments
 (0)