diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | devel/pacc/BUILD | 2 | ||||
-rwxr-xr-x | devel/pacc/DEPENDS | 1 | ||||
-rwxr-xr-x | devel/pacc/DETAILS | 29 | ||||
-rw-r--r-- | devel/pacc/HISTORY | 2 | ||||
-rwxr-xr-x | devel/pacc/INSTALL | 2 |
6 files changed, 39 insertions, 0 deletions
@@ -1,3 +1,6 @@ +2019-08-01 Ismael Luceno <ismael@sourcemage.org> + * devel/pacc: new spell, a compiler-compiler + 2019-07-30 Ismael Luceno <ismael@sourcemage.org> * archive/paxmirabilis: new spell, pax implementation from MirBSD diff --git a/devel/pacc/BUILD b/devel/pacc/BUILD new file mode 100755 index 0000000000..1bc0c4e127 --- /dev/null +++ b/devel/pacc/BUILD @@ -0,0 +1,2 @@ +make pacc doc/pacc.man \ + CFLAGS="$CFLAGS -std=c99 -Wall -Wextra -I." diff --git a/devel/pacc/DEPENDS b/devel/pacc/DEPENDS new file mode 100755 index 0000000000..48f2e7fa8e --- /dev/null +++ b/devel/pacc/DEPENDS @@ -0,0 +1 @@ +depends help2man diff --git a/devel/pacc/DETAILS b/devel/pacc/DETAILS new file mode 100755 index 0000000000..8347a59faa --- /dev/null +++ b/devel/pacc/DETAILS @@ -0,0 +1,29 @@ + SPELL=pacc + VERSION=0.3 + SOURCE="$SPELL-$VERSION.tar.bz2" + SOURCE_URL[0]=https://static.paccrat.org/release/$SOURCE + SOURCE_HASH=sha512:b6f3cadf2ecc96a41a04558e6b8d9d4c55bba15b467c9a9354e51f6fe62898e4753321cceee14d9c8c84000381b64b3db3bd89793e9c27dd2c795fd4847194bb +SOURCE_DIRECTORY="$BUILD_DIRECTORY/$SPELL-$VERSION" + WEB_SITE="https://paccrat.org/" + LICENSE[0]="GPL-3.0-only" + ENTERED=20190801 + KEYWORDS="" + SHORT="a compiler-compiler" +cat << EOF +pacc is a compiler-compiler, somewhat like yacc (or bison). Its input is a +description of a grammar, and its output is a C function that recognizes +strings of that grammar. The significant technical difference is this: +yacc reads a context-free grammar (CFGs), and writes a LALR(1) parser; +pacc reads a parsing expression grammar (PEG), and writes a packrat parser. + +PEGs and packrat parsing offer several advantages over CFGs. + +* There is no need for a two-level structure with a separate lexer (this is + essentially a misfeature of CFGs - they are unable to express standard + tokenization rules naturally). +* PEGs can “look ahead” in the input as far as they need to. * Despite +arbitrary look-ahead, packrat parsers are linear in time and + space complexity: O(n) in the size of the input (whereas LALR(1) parsers + are O(n²), and fully general CFG parsing is O(n³)). +* PEGs are easy to understand, and pleasant to work with. +EOF diff --git a/devel/pacc/HISTORY b/devel/pacc/HISTORY new file mode 100644 index 0000000000..d2d2fc5d20 --- /dev/null +++ b/devel/pacc/HISTORY @@ -0,0 +1,2 @@ +2019-08-01 Ismael Luceno <ismael@sourcemage.org> + * BUILD, DEPENDS, DETAILS, INSTALL: spell created diff --git a/devel/pacc/INSTALL b/devel/pacc/INSTALL new file mode 100755 index 0000000000..bddc0a3c59 --- /dev/null +++ b/devel/pacc/INSTALL @@ -0,0 +1,2 @@ +install -D -m555 {,"$INSTALL_ROOT"/usr/bin/}pacc -m555 && +install -D -m444 doc/pacc.man "$INSTALL_ROOT"/usr/share/man/man1/pacc.1 |