$(infodir)/epa$(INFO_EXT) $(infodir)/mairix-el$(INFO_EXT) $(infodir)/sasl$(INFO_EXT) \
$(infodir)/auth$(INFO_EXT) $(infodir)/eieio$(INFO_EXT) $(infodir)/ede$(INFO_EXT) \
$(infodir)/semantic$(INFO_EXT) $(infodir)/edt$(INFO_EXT) $(infodir)/emacs-gnutls$(INFO_EXT) \
- $(infodir)/srecode$(INFO_EXT) $(infodir)/bovine$(INFO_EXT)
+ $(infodir)/srecode$(INFO_EXT) $(infodir)/bovine$(INFO_EXT) \
+ $(infodir)/wisent$(INFO_EXT)
DVI_TARGETS = calc.dvi cc-mode.dvi cl.dvi dbus.dvi dired-x.dvi \
ediff.dvi forms.dvi gnus.dvi message.dvi emacs-mime.dvi \
sieve.dvi pgg.dvi mh-e.dvi \
newsticker.dvi rcirc.dvi erc.dvi ert.dvi \
remember.dvi nxml-mode.dvi \
epa.dvi mairix-el.dvi sasl.dvi auth.dvi eieio.dvi ede.dvi \
- semantic.dvi edt.dvi emacs-gnutls.dvi srecode.dvi bovine.dvi
+ semantic.dvi edt.dvi emacs-gnutls.dvi srecode.dvi bovine.dvi \
+ wisent.dvi
INFOSOURCES = info.texi
# The following rule does not work with all versions of `make'.
bovine.dvi: bovine.texi doclicense.texi
$(ENVADD) $(TEXI2DVI) $(srcdir)/bovine.texi
+$(infodir)/wisent$(INFO_EXT): wisent.texi doclicense.texi
+ $(MAKEINFO) $(MAKEINFO_OPTS) $(INFO_OPTS) -o $@ wisent.texi
+wisent.dvi: wisent.texi doclicense.texi
+ $(ENVADD) $(TEXI2DVI) $(srcdir)/wisent.texi
mostlyclean:
- $(DEL) *.log *.cp *.fn *.ky *.pg *.vr core *.tp *.core gnustmp.*
$(infodir)/eieio* $(infodir)/ede* \
$(infodir)/semantic* $(infodir)edt* \
$(infodir)/emacs-gnutls* $(infodir)/srecode* \
- $(infodir)/bovine*
+ $(infodir)/bovine* $(infodir)/wisent*
distclean: clean
- $(DEL) makefile
\input texinfo @c -*-texinfo-*-
@c %**start of header
-@setfilename wisent.info
+@setfilename ../../info/wisent
@set TITLE Wisent Parser Development
@set AUTHOR Eric M. Ludlam, David Ponce, and Richard Y. Kim
@settitle @value{TITLE}
@c %**end of header
@copying
-This manual documents the Wisent parser generator.
-
-Copyright @copyright{} 2001, 2002, 2003, 2004, 2007 David Ponce
+Copyright @copyright{} 1988-1993, 1995, 1998-2004, 2007, 2012
+Free Software Foundation, Inc.
+@c Since we are both GNU manuals, we do not need to ack each other here.
+@ignore
Some texts are borrowed or adapted from the manual of Bison version
1.35. The text in section entitled ``Understanding the automaton'' is
adapted from the section ``Understanding Your Parser'' in the manual
of Bison version 1.49.
-
-Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1995, 1998,
-1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+@end ignore
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.1 or
-any later version published by the Free Software Foundation; with the
-Invariant Sections being list their titles, with the Front-Cover Texts
-being list, and with the Back-Cover Texts being list. A copy of the
-license is included in the section entitled ``GNU Free Documentation
-License''.
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
+and with the Back-Cover Texts as in (a) below. A copy of the license
+is included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
+modify this GNU manual. Buying copies from the FSF supports it in
+developing GNU and promoting software freedom.''
@end quotation
@end copying
-@ifinfo
-@dircategory Emacs
+@dircategory Emacs misc features
@direntry
-* Semantic Wisent parser development: (wisent).
+* Wisent: (wisent). Semantic Wisent parser development.
@end direntry
-@end ifinfo
@iftex
@finalout
@c @setchapternewpage odd
@c @setchapternewpage off
-@ifinfo
-This file documents Application Development with Semantic.
-@emph{Infrastructure for parser based text analysis in Emacs}
-
-Copyright @copyright{} 2001, 2002, 2003, 2004 @value{AUTHOR}
-@end ifinfo
-
@titlepage
@sp 10
@title @value{TITLE}
@author by @value{AUTHOR}
-@vskip 0pt plus 1 fill
-Copyright @copyright{} 2001, 2002, 2003, 2004 @value{AUTHOR}
@page
@vskip 0pt plus 1 fill
@insertcopying
@end titlepage
@page
-@c MACRO inclusion
-@include semanticheader.texi
-@paragraphindent none
-
+@macro semantic{}
+@i{Semantic}
+@end macro
@c *************************************************************************
@c @ Document
It also describes how Wisent is used with the @semantic{} tool set
described in the @ref{Top, Semantic Manual, Semantic Manual, semantic}.
+@ifnottex
+@insertcopying
+@end ifnottex
+
@menu
-* Wisent Overview::
-* Wisent Grammar::
-* Wisent Parsing::
-* Wisent Semantic::
-* GNU Free Documentation License::
-* Index::
+* Wisent Overview::
+* Wisent Grammar::
+* Wisent Parsing::
+* Wisent Semantic::
+* GNU Free Documentation License::
+* Index::
@end menu
@node Wisent Overview
It benefits from these Bison features:
@itemize @bullet
-@item
+@item
It uses a fast but not so space-efficient encoding for the parse
tables, described in Corbett's PhD thesis from Berkeley:
@quotation
June 1985, Report No. UCB/CSD 85/251.
@end quotation
-@item
+@item
For generating the lookahead sets, Wisent uses the well-known
technique of F. DeRemer and A. Pennello they described in:
@quotation
October 1982, ACM TOPLS Vol 4 No 4.
@end quotation
-@item
+@item
Wisent resolves shift/reduce conflicts using operator precedence and
associativity.
-@item
+@item
Parser error recovery is accomplished using rules which match the
special token @code{error}.
@end itemize
Says that two groupings of type @samp{exp}, with a @samp{PLUS} token
in between, can be combined into a larger grouping of type @samp{exp}.
-
+
@menu
-* Grammar format::
-* Example::
-* Compiling a grammar::
-* Conflicts::
+* Grammar format::
+* Example::
+* Compiling a grammar::
+* Conflicts::
@end menu
@node Grammar format, Example, Wisent Grammar, Wisent Grammar
'(
;; Terminals
(NUM)
-
+
;; Terminal associativity & precedence
((nonassoc ?=)
(left ?- ?+)
(left ?* ?/)
(left NEG)
(right ?^))
-
+
;; Rules
(input
((line))
@end table
@menu
-* Grammar Debugging::
-* Understanding the automaton::
+* Grammar Debugging::
+* Understanding the automaton::
@end menu
@node Grammar Debugging
(wisent-compile-grammar
'((NUM STR) ; %token NUM STR
- ((left ?+ ?-) ; %left '+' '-';
+ ((left ?+ ?-) ; %left '+' '-';
(left ?*)) ; %left '*'
(exp ; exp:
@end defvar
@menu
-* Writing a lexer::
-* Actions goodies::
-* Report errors::
-* Error recovery::
-* Debugging actions::
+* Writing a lexer::
+* Actions goodies::
+* Report errors::
+* Error recovery::
+* Debugging actions::
@end menu
@node Writing a lexer
for more information on @semantic{} grammars.
@menu
-* Grammar styles::
-* Wisent Lex::
+* Grammar styles::
+* Wisent Lex::
@end menu
@node Grammar styles
it can be worth a mix of the two styles!
@menu
-* Iterative style::
-* Bison style::
-* Mixed style::
-* Start nonterminals::
-* Useful functions::
+* Iterative style::
+* Bison style::
+* Mixed style::
+* Start nonterminals::
+* Useful functions::
@end menu
@node Iterative style, Bison style, Grammar styles, Grammar styles
reviewed to ensure that the incremental parser will work!}
Things are a little bit different when the grammar is written in Bison
-style.
+style.
@strong{The @code{reparse-symbol} property is set to the nonterminal
symbol the rule that explicitly uses @code{EXPANDTAG} belongs to.}
@itemx end
Are the start and end positions of mapped data in the input buffer.
@end table
-
+
The Wisent's parser doesn't depend on the nature of analyzed input
stream (buffer, string, etc.), and requires that lexical tokens have a
different form (@pxref{Writing a lexer}):
@node GNU Free Documentation License
@appendix GNU Free Documentation License
-@include fdl.texi
+@include doclicense.texi
@node Index
@unnumbered Index