Skip to content
Redirected from ParsingExpressionGrammars
created by Aha00aAha00a at 2019-09-03
last modified by Aha00aAha00a at 2022-04-17
revision: 20

Parsing Expression Grammar

PEG

https://en.wikipedia.org/wiki/Parsing_expression_grammar

AhaMarkJavaScript로 재구현 해야겠다는 생각을 했고, 이에 대해서 BNF, EBNF, ABNF를 찾아보다가 PEG가 있다는 걸 이제서야 알게 되었다.

이미 알았다면 AhaWiki를 만들 때에도 사용했을 텐데.. 그때는 EBNF로 하다 중도 포기하고 RegularExpression으로 무한삽질을 했지..

--2019-09-03

1. Libraries

  • https://github.com/pegjs/pegjs
    • dmajda님이 만들고, #503을 통해 2017년에 futagoza님이 넘겨받은 프로젝트였으나, 2020#639에 따르면 이후에 Release조차 한번도 없어서 여러 사람들이 소유권을 이전해 달라고 요청들을 했으나 묵묵부답이어서 https://github.com/peggyjs/peggy로 하드포크하게 된다. #667에 보면 peggy로 넘어오라는 이슈가 있다. 훌륭한 오픈소스가 메인테이너를 잘못 선정하여 한참을 제자리에 있었다는게 마음 아프다. --2021-12-01
    • #639#issuecomment-731566337

      dmajda

      I’m not really upset, but I regret not doing two things:

      • Not waiting longer before handing PEG.js over to a new maintainer. Maybe I should have waited for multiple candidates to appear and choose between them, require contributions first, or something similar.
      • Not keeping the “keys” to the project (access to PEG.js website, GitHub, and npm package).

      Any of these may have prevented the current situation. Unfortunately, this is obvious only in retrospect.

  • https://github.com/peggyjs/peggy - 이걸 쓰도록 한다.

    Peggy is a simple parser generator for JavaScript that produces fast parsers with excellent error reporting. You can use it to process complex data or computer languages and build transformers, interpreters, compilers and other tools easily.

    Peggy is the successor of PEG.js which had been abandoned by its maintainer.

  • https://github.com/Phrogz/PEGSH - Realtime PEG Syntax Highlighting in a web browser
  • https://github.com/cdiggins/myna-parser

3. See Also

3.2. Adjacent Pages

Control
≤ 32
all
1.0x
1.0x
80
-120
ON
Metrics
Nodes(visible/total)0/0
Links(visible/total)0/0
Avg degree0.00
Depth coverage0
Queue(fetch/graph)0 / 0
Zoom(scale)1.00x
Ctrl/⌘ + Scroll: Zoom
Root 1-hop 2-hop+