**/
/* }}} */
-@if Bison23 %{
-
-@if Bison24 %code top {
+%code top {
#define cyscanner driver.scanner_
#define YYSTACKEXPANDABLE 1
-@if Bison23 #define yyerrok (yyerrstatus_ = 0)
-@if Bison24 }
+}
-@if Bison24 %code requires {
+%code requires {
#include "Driver.hpp"
#include "Parser.hpp"
#define CYNew new($pool)
} YYSTYPE;
#define YYSTYPE YYSTYPE
+}
-@if Bison24 %code provides {
+%code provides {
int cylex(YYSTYPE *, cy::location *, void *);
-@if Bison24 }
-
-@if Bison23 %}
-@if Bison23 %union {
-@if Bison23 }
-@if Bison23 %{
-
-@if Bison24 }
-@if Bison23 %}
+}
-%name-prefix="cy"
+%name-prefix "cy"
-@if Bison23 %skeleton "lalr1.cc"
-@if Bison24 %language "C++"
+%language "C++"
%initial-action {
@$.begin.filename = @$.end.filename = &driver.filename_;
%type <null_> NullLiteral
%type <literal_> ObjectLiteral
%type <compound_> Parenthetical
-%type <compound_> ParentheticalOpt
+//%type <compound_> ParentheticalOpt
%type <expression_> PostfixExpression
%type <expression_> PrimaryExpression
%type <statement_> Program
;
LexNoBrace
- : { if (yychar == yyempty_) driver.no_.OpenBrace = true; else if (yychar == token::OpenBrace || yychar == token::OpenBrace_) yychar = token::OpenBrace__; }
+ : { if (yyla.empty()) driver.no_.OpenBrace = true; else if (yyla.type == yytranslate_(token::OpenBrace) || yyla.type == yytranslate_(token::OpenBrace_)) yyla.type = yytranslate_(token::OpenBrace__); }
;
LexNoFunction
- : { if (yychar == yyempty_) driver.no_.Function = true; else if (yychar == token::Function) yychar = token::Function_; }
+ : { if (yyla.empty()) driver.no_.Function = true; else if (yyla.type == yytranslate_(token::Function)) yyla.type = yytranslate_(token::Function_); }
;
LexNoAtImplementation :
@begin ObjectiveC
- { if (yychar == yyempty_) driver.no_.AtImplementation = true; else if (yychar == token::AtImplementation) yychar = token::AtImplementation_; }
+ { if (yyla.empty()) driver.no_.AtImplementation = true; else if (yyla.type == yytranslate_(token::AtImplementation)) yyla.type = yytranslate_(token::AtImplementation_); }
@end
;
/* 7.9 Automatic Semicolon Insertion {{{ */
StrictSemi
- : { driver.Warning(yylloc, "warning, automatic semi-colon insertion required"); }
+ : { driver.Warning(@$, "warning, automatic semi-colon insertion required"); }
;
Terminator
: ";"
- | error { if (yychar != yyeof_ && yychar != token::CloseBrace && !yylval.newline_) YYABORT; else { yyerrok; driver.errors_.pop_back(); } } StrictSemi
+ | error { if (yyla.type_get() != yyeof_ && yyla.type != token::CloseBrace && !yyla.value.newline_) YYABORT; else { yyerrok; driver.errors_.pop_back(); } } StrictSemi
;
TerminatorOpt
: "(" LexPushInOff Expression ")" LexPopIn { $$ = $3; }
;
-ParentheticalOpt
+/*ParentheticalOpt
: Parenthetical { $$ = $1; }
| { $$ = NULL; }
- ;
+ ;*/
Variable
: Identifier { $$ = CYNew CYVariable($1); }
libcycript_la_SOURCES = ConvertUTF.c Decode.cpp Driver.cpp Highlight.cpp Library.cpp Network.cpp Output.cpp Parser.cpp Replace.cpp
libcycript_la_SOURCES += Cycript.tab.cc lex.cy.cpp
-filters = $(CY_FILTERS)
+filters =
if CY_CONSOLE
bin_PROGRAMS = cycript
CY_ARCH = @CY_ARCH@
CY_ATTACH_GROUP = @CY_ATTACH_GROUP@
CY_EXECUTE = @CY_EXECUTE@
-CY_FILTERS = @CY_FILTERS@
CY_JAVA = @CY_JAVA@
CY_MACH = @CY_MACH@
CY_OBJECTIVEC = @CY_OBJECTIVEC@
Highlight.cpp Library.cpp Network.cpp Output.cpp Parser.cpp \
Replace.cpp Cycript.tab.cc lex.cy.cpp $(am__append_1) \
$(am__append_7) $(am__append_10) $(am__append_12)
-filters = $(CY_FILTERS) $(am__append_4) $(am__append_6) \
- $(am__append_9)
+filters = $(am__append_4) $(am__append_6) $(am__append_9)
@CY_CONSOLE_TRUE@cycript_SOURCES = Console.cpp Display.cpp \
@CY_CONSOLE_TRUE@ $(am__append_13)
@CY_CONSOLE_TRUE@cycript_LDADD = libcycript.la $(LTLIBREADLINE) $(LTLIBTERMCAP) $(LTLIBGCC) -ldl
WEBKIT_CFLAGS
CY_EXECUTE
CY_ARCH
-CY_FILTERS
GNUTAR
GPERF
FLEX
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison >= 2.3" >&5
-$as_echo_n "checking for bison >= 2.3... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bison >= 3.0" >&5
+$as_echo_n "checking for bison >= 3.0... " >&6; }
if test -z "$BISON"; then
ac_path_BISON_found=false
# Loop through the user's path and test for each of PROGNAME-LIST
}
'
as_arg_v1=$version
-as_arg_v2=2.3
+as_arg_v2=3.0
awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null
case $? in #(
1) :
else
if true; then :
- as_fn_error $? "You need bison 2.3 or greater" "$LINENO" 5
+ as_fn_error $? "You need bison 3.0 or greater" "$LINENO" 5
else
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking bison for %code{}" >&5
-$as_echo_n "checking bison for %code{}... " >&6; }
-echo '%code{}%%_:' >conftest.y
-if $BISON conftest.y -o/dev/null 2>/dev/null; then
-
- for element in Bison24; do
- haveit=
- for x in $CY_FILTERS; do
-
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- eval x=\"$x\"
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- CY_FILTERS="${CY_FILTERS}${CY_FILTERS:+ }$element"
- fi
- done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-
- for element in Bison23; do
- haveit=
- for x in $CY_FILTERS; do
-
- acl_save_prefix="$prefix"
- prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
- exec_prefix="$acl_final_exec_prefix"
- eval x=\"$x\"
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
-
- if test "X$x" = "X$element"; then
- haveit=yes
- break
- fi
- done
- if test -z "$haveit"; then
- CY_FILTERS="${CY_FILTERS}${CY_FILTERS:+ }$element"
- fi
- done
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-rm -f conftest.y
-
-
]) dnl }}}
CY_CHECK_PROGS_VERSION([BISON], [bison], [GNU Project parser generator (yacc replacement)],
- [-V | $SED -e '1 s/^bison (GNU Bison) \(.*\)$/\1/p;d'], [2.3])
+ [-V | $SED -e '1 s/^bison (GNU Bison) \(.*\)$/\1/p;d'], [3.0])
CY_CHECK_PROGS_VERSION([FLEX], [flex], [the fast lexical analyser generator],
[--version | $SED -e '1 s/^@<:@^0-9.@:>@* \(@<:@0-9.@:>@*\).*$/\1/p;d'], [2.5.33])
CY_CHECK_PROGS_VERSION([GPERF], [gperf], [perfect hash function generator],
CY_CHECK_PROGS_VERSION([GNUTAR], [tar gtar gnutar], [a very sticky lump of files],
[--version | $SED -e '1 s/^tar (GNU tar) \(.*\)$/\1/p;d'], [1.19])
-AC_MSG_CHECKING([bison for %code{}])
-echo '%code{}%%_:' >conftest.y
-if $BISON conftest.y -o/dev/null 2>/dev/null; then
- AC_LIB_APPENDTOVAR([CY_FILTERS], [Bison24])
- AC_MSG_RESULT([yes])
-else
- AC_LIB_APPENDTOVAR([CY_FILTERS], [Bison23])
- AC_MSG_RESULT([no])
-fi
-
-rm -f conftest.y
-AC_SUBST([CY_FILTERS])
-
dnl CY_TRY {{{
AC_DEFUN([CY_SUCCESS], [cy_good=1])
AC_DEFUN([CY_FAILURE], [cy_good=0])