mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-08 06:48:28 +00:00
- Change from post-extract: to post-patch:
- Cosmetic change - Update WWW
This commit is contained in:
parent
20f93ce0b1
commit
cba7f31986
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=429539
@ -15,30 +15,27 @@ BUILD_DEPENDS= m4>=1.4.16,1:devel/m4
|
||||
RUN_DEPENDS= m4>=1.4.16,1:devel/m4
|
||||
|
||||
OPTIONS_DEFINE= EXAMPLES NLS
|
||||
|
||||
USES= charsetfix makeinfo perl5 tar:xz
|
||||
USE_PERL5= build
|
||||
GNU_CONFIGURE= yes
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
|
||||
CONFIGURE_ARGS+=--disable-yacc
|
||||
|
||||
INFO= bison
|
||||
|
||||
NLS_USES= gettext
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
OPTIONS_SUB= yes
|
||||
|
||||
post-extract:
|
||||
CONFIGURE_ARGS+=--disable-yacc
|
||||
CPPFLAGS+= -I${LOCALBASE}/include
|
||||
GNU_CONFIGURE= yes
|
||||
LDFLAGS+= -L${LOCALBASE}/lib
|
||||
USE_PERL5= build
|
||||
USES= charsetfix makeinfo perl5 tar:xz
|
||||
|
||||
INFO= bison
|
||||
PORTEXAMPLES= calc++
|
||||
|
||||
NLS_CONFIGURE_ENABLE= nls
|
||||
NLS_USES= gettext
|
||||
|
||||
post-patch:
|
||||
@${RM} ${WRKSRC}/doc/bison.info*
|
||||
@${REINPLACE_CMD} 's/MANS = yacc.1/MANS =/' ${WRKSRC}/doc/Makefile.in
|
||||
|
||||
PORTEXAMPLES= calc++
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}/calc++
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/calc++/*.[chly]* \
|
||||
${STAGEDIR}${EXAMPLESDIR}/calc++
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/calc++/*.[chly]* ${STAGEDIR}${EXAMPLESDIR}/calc++
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
@ -1,22 +1,13 @@
|
||||
Bison is a tool used to write parsers, such as the parser for GNU cc.
|
||||
It is similar to Yacc, which is included in the base FreeBSD system.
|
||||
Bison is a general-purpose parser generator that converts an annotated
|
||||
context-free grammar into a deterministic LR or generalized LR (GLR) parser
|
||||
employing LALR(1) parser tables. As an experimental feature, Bison can also
|
||||
generate IELR(1) or canonical LR(1) parser tables. Once you are proficient with
|
||||
Bison, you can use it to develop a wide range of language parsers, from those
|
||||
used in simple desk calculators to complex programming languages.
|
||||
|
||||
The main difference between Bison and Yacc that I know of is that
|
||||
Bison supports the @N construction, which gives you access to
|
||||
the starting and ending line number and character number associated
|
||||
with any of the symbols in the current rule.
|
||||
Bison is upward compatible with Yacc: all properly-written Yacc grammars ought
|
||||
to work with Bison with no change. Anyone familiar with Yacc should be able to
|
||||
use Bison with little trouble. You need to be fluent in C or C++ programming in
|
||||
order to use Bison. Java is also supported as an experimental feature.
|
||||
|
||||
Also, Bison supports the command `%expect N' which says not to mention
|
||||
the conflicts if there are N shift/reduce conflicts and no reduce/reduce
|
||||
conflicts.
|
||||
|
||||
The differences in the algorithms stem mainly from the horrible
|
||||
kludges that Johnson had to perpetrate to make Yacc fit in a PDP-11.
|
||||
|
||||
Also, Bison uses a faster but less space-efficient encoding for the
|
||||
parse tables (see Corbett's PhD thesis from Berkeley, "Static
|
||||
Semantics in Compiler Error Recovery", June 1985, Report No. UCB/CSD
|
||||
85/251), and more modern technique for generating the lookahead sets.
|
||||
(See "Efficient Construction of LALR(1) Lookahead Sets" by F. DeRemer
|
||||
and A. Pennello, in ACM TOPLS Vol 4 No 4, October 1982. Their
|
||||
technique is the standard one now.)
|
||||
WWW: https://www.gnu.org/software/bison/
|
||||
|
Loading…
Reference in New Issue
Block a user