X-Git-Url: https://git.saurik.com/cycript.git/blobdiff_plain/4e869640036110df20ccde74fcb5a5167f28622a..17fe7546f6ef4df0bc8b0394e39d929c93d5c1f4:/Cycript.yy.in diff --git a/Cycript.yy.in b/Cycript.yy.in index ece104f..0181676 100644 --- a/Cycript.yy.in +++ b/Cycript.yy.in @@ -37,13 +37,15 @@ */ /* }}} */ -%{ +@if Bison23 %{ + +@if Bison24 %code top { #define cyscanner driver.scanner_ #define YYSTACKEXPANDABLE 1 -#define yyerrok (yyerrstatus_ = 0) -%} +@if Bison23 #define yyerrok (yyerrstatus_ = 0) +@if Bison24 } -%{ +@if Bison24 %code requires { #include "Parser.hpp" @begin ObjectiveC @@ -112,22 +114,24 @@ typedef struct { } YYSTYPE; #define YYSTYPE YYSTYPE +@if Bison24 } -%} - -%{ +@if Bison24 %code provides { int cylex(YYSTYPE *, cy::location *, void *); -%} +@if Bison24 } + +@if Bison23 %} %name-prefix="cy" -%skeleton "lalr1.cc" -%locations +@if Bison23 %skeleton "lalr1.cc" +@if Bison24 %language "C++" %initial-action { @$.begin.filename = @$.end.filename = &driver.filename_; }; +%locations %defines //%glr-parser