mirror of https://git.FreeBSD.org/ports.git
Browse Source
WWW: https://www.piumarta.com/software/peg/ Sponsored by: The FreeBSD Foundation2022Q3
5 changed files with 61 additions and 0 deletions
@ -0,0 +1,21 @@
|
||||
PORTNAME= peg
|
||||
DISTVERSION= 0.1.18
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= https://www.piumarta.com/software/peg/
|
||||
|
||||
MAINTAINER= jrm@FreeBSD.org
|
||||
COMMENT= Recursive-descent parser generators for C
|
||||
|
||||
LICENSE= MIT
|
||||
|
||||
USES= gmake
|
||||
|
||||
PLIST_FILES= bin/leg \
|
||||
bin/peg \
|
||||
man/man1/peg.1.gz
|
||||
|
||||
post-patch: |
||||
@${REINPLACE_CMD} -e 's,%%STAGEDIR%%,${STAGEDIR},g' \
|
||||
-e 's,%%PREFIX%%,${PREFIX},g' ${WRKSRC}/Makefile
|
||||
|
||||
.include <bsd.port.mk> |
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1655934585 |
||||
SHA256 (peg-0.1.18.tar.gz) = 20193bdd673fc7487a38937e297fff08aa73751b633a086ac28c3b34890f9084 |
||||
SIZE (peg-0.1.18.tar.gz) = 57776 |
@ -0,0 +1,19 @@
|
||||
--- Makefile.orig 2016-07-22 00:55:15 UTC |
||||
+++ Makefile |
||||
@@ -1,4 +1,4 @@ |
||||
-CFLAGS = -g -Wall $(OFLAGS) $(XFLAGS) -Isrc |
||||
+CFLAGS = -Wall $(OFLAGS) $(XFLAGS) -Isrc |
||||
OFLAGS = -O3 -DNDEBUG |
||||
#OFLAGS = -pg |
||||
|
||||
@@ -14,8 +14,8 @@ leg : leg.o $(OBJS) |
||||
$(CC) $(CFLAGS) -o $@-new leg.o $(OBJS) |
||||
mv $@-new $@ |
||||
|
||||
-ROOT = |
||||
-PREFIX = /usr/local |
||||
+ROOT = %%STAGEDIR%% |
||||
+PREFIX = %%PREFIX%% |
||||
BINDIR = $(ROOT)$(PREFIX)/bin |
||||
MANDIR = $(ROOT)$(PREFIX)/man/man1 |
||||
|
@ -0,0 +1,17 @@
|
||||
peg and leg are tools for generating recursive-descent parsers: programs |
||||
that perform pattern matching on text. They processes a Parsing |
||||
Expression Grammar (PEG) [Ford 2004] to produce a program that |
||||
recognises legal sentences of that grammar. peg processes PEGs written |
||||
using the original syntax described by Ford; leg processes PEGs written |
||||
using slightly different syntax and conventions that are intended to |
||||
make it an attractive replacement for parsers built with lex and |
||||
yacc. Unlike lex and yacc, peg and leg support unlimited backtracking, |
||||
provide ordered choice as a means for disambiguation, and can combine |
||||
scanning (lexical analysis) and parsing (syntactic analysis) into a |
||||
single activity. |
||||
|
||||
[Ford 2004] Bryan Ford, Parsing Expression Grammars: A Recognition-Based |
||||
Syntactic Foundation. ACM SIGPLAN Symposium on Principles of Programming |
||||
Languages (POPL), 2004. |
||||
|
||||
WWW: https://www.piumarta.com/software/peg/ |
Loading…
Reference in new issue