Re: Can push parsers be used for C++ and Java

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.general
Message-ID <[email protected]>
Hi Arthur,

> Le 14 déc. 2013 à 20:24, Arthur Schwarz <[email protected]> a écrit :
> 
> Section 3.7.13 page 88
>    States that the api.push-pull is only available for C. Is that right? Is there any reason that is unusable in C++ and Java? I did send you a manual bug on Java inconsistencies in the regard but after thinking about it awhile, I can't see wat the issue is for C++ and Java. 

The issue is that someone has to implement the feature :)

Yet you were right, the Java skeleton does support push parsers.  I'm installing this.

Cheers!

commit 627513737876a71affdff311a297453568075607
Author: Akim Demaille <[email protected]>
Date:   Sat May 2 09:29:05 2020 +0200

    doc: java supports push parsers since 3.0 (2013-07-25)
    
    * doc/bison.texi: Clarify this.

diff --git a/doc/bison.texi b/doc/bison.texi
index eaa728e5..32d41924 100644
--- a/doc/bison.texi
+++ b/doc/bison.texi
@@ -2369,9 +2369,9 @@ yylex (void)
 @end group
 @end example
 
-Basically, the lexical analyzer performs the same processing as before:
-it skips blanks and tabs, and reads numbers or single-character tokens.
-In addition, it updates @code{yylloc}, the global variable (of type
+Basically, the lexical analyzer performs the same processing as before: it
+skips blanks and tabs, and reads numbers or single-character tokens.  In
+addition, it updates @code{yylloc}, the global variable (of type
 @code{YYLTYPE}) containing the token's location.
 
 Now, each time this function returns a token, the parser has its kind as
@@ -6132,7 +6132,7 @@ the @code{full} value was introduced in Bison 2.7
 @deffn Directive {%define api.push-pull} @var{kind}
 
 @itemize @bullet
-@item Language(s): C (deterministic parsers only)
+@item Language(s): C (deterministic parsers only), Java
 
 @item Purpose: Request a pull parser, a push parser, or both.
 @xref{Push Decl}.
@@ -13022,9 +13022,6 @@ of the parser is always local to an instance of the parser class.
 Therefore, all Java parsers are ``pure'', and the @code{%define api.pure}
 directive does nothing when used in Java.
 
-Push parsers are currently unsupported in Java and @code{%define
-api.push-pull} have no effect.
-
 GLR parsers are currently unsupported in Java.  Do not use the
 @code{glr-parser} directive.
 
@@ -14738,8 +14735,8 @@ In semantic actions, it stores the location of the lookahead token.
 @end deffn
 
 @deffn {Type} YYLTYPE
-Data type of @code{yylloc}; by default, a structure with four
-members.  @xref{Location Type}.
+Data type of @code{yylloc}; by default, a structure with four members.
+@xref{Location Type}.
 @end deffn
 
 @deffn {Variable} yylval
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.