head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.26 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.24 pkgsrc-2012Q4-base:1.2 pkgsrc-2011Q4:1.2.0.22 pkgsrc-2011Q4-base:1.2 pkgsrc-2011Q2:1.2.0.20 pkgsrc-2011Q2-base:1.2 pkgsrc-2009Q4:1.2.0.18 pkgsrc-2009Q4-base:1.2 pkgsrc-2008Q4:1.2.0.16 pkgsrc-2008Q4-base:1.2 pkgsrc-2008Q3:1.2.0.14 pkgsrc-2008Q3-base:1.2 cube-native-xorg:1.2.0.12 cube-native-xorg-base:1.2 pkgsrc-2008Q2:1.2.0.10 pkgsrc-2008Q2-base:1.2 pkgsrc-2008Q1:1.2.0.8 pkgsrc-2008Q1-base:1.2 pkgsrc-2007Q4:1.2.0.6 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.4 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.2 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.1.0.2 pkgsrc-2007Q1-base:1.1; locks; strict; comment @# @; 1.2 date 2007.05.23.13.53.01; author markd; state dead; branches; next 1.1; 1.1 date 2007.03.24.14.01.31; author markd; state Exp; branches; next ; desc @@ 1.2 log @Update kdevelop to 3.4.1 (part of KDE 3.5.7) @ text @$NetBSD: patch-bm,v 1.1 2007/03/24 14:01:31 markd Exp $ --- buildtools/lib/parsers/qmake/qmake.yy.orig 2007-01-26 04:42:02.000000000 +1300 +++ buildtools/lib/parsers/qmake/qmake.yy @@@@ -2,6 +2,8 @@@@ /*************************************************************************** * Copyright (C) 2005 by Alexander Dymo * * adymo@@kdevelop.org * + * Copyright (C) 2006 by Andreas Pakulat * + * apaku@@gmx.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * @@@@ -38,7 +40,9 @@@@ SOURCES = foo #regognize me #define YYSTYPE_IS_DECLARED -using namespace QMake; +namespace QMake +{ + class Lexer; /** The yylval type. @@@@ -70,13 +74,11 @@@@ struct Result { QString indent; }; +#define YYSTYPE Result typedef Result YYSTYPE; - -void yyerror(const char *str) { - printf("%s\n", str); } -int yylex(); +extern int QMakelex( QMake::Result* yylval, QMake::Lexer* lexer ); /** The stack to store ProjectAST pointers when a new child @@@@ -90,7 +92,7 @@@@ When a scope or function scope statement and pushed onto the stack. Therefore all statements which belong to the scope or function scope are added as childs to their direct parent (scope or function scope). */ -QValueStack projects; +//QValueStack projects; /** The current depth of AST node is stored here. @@@@ -98,7 +100,7 @@@@ AST depth is important to know because a be easily implemented (the parser itself looses all information about indentation). */ -int depth = 0; +// int depth = 0; /* To debug this parser, put the line below into the next bison file section. @@@@ -107,10 +109,19 @@@@ Don't forget to uncomment "yydebug = 1" */ %} +%skeleton "lalr1.cc" +%define "parser_class_name" "Parser" +%name-prefix="QMake" +%parse-param { QMake::Lexer* lexer } +%parse-param { QValueStack& projects } +%parse-param { int depth } +%lex-param { QMake::Lexer* lexer } +%start project + %token ID_SIMPLE %token EQ %token PLUSEQ -%token MINUSQE +%token MINUSEQ %token STAREQ %token TILDEEQ %token LBRACE @@@@ -228,7 +239,7 @@@@ variable_value : VARIABLE_VALUE { $< | QUOTED_VARIABLE_VALUE { $$ = $1; } ; -operator : EQ | PLUSEQ | MINUSQE | STAREQ | TILDEEQ +operator : EQ | PLUSEQ | MINUSEQ | STAREQ | TILDEEQ ; scope : ID_SIMPLE @@@@ -315,4 +326,11 @@@@ emptyline : NEWLINE %% -#include "qmake_lex.cpp" + +namespace QMake +{ + void Parser::error(const location_type& /*l*/, const std::string& m) + { + std::cerr << m << std::endl; + } +} @ 1.1 log @Update kdevelop-base to 3.4.0 KDevelop 3.4.0 closes more than 500 bugs. There is an impressive list of additional features including improved Qt 4 support, new debugging abilities, more attractive default user interface layout and improvements for C++, Ruby and PHP support. pkg includes post 3.4.0 fixes for a QMake parser bug. @ text @d1 1 a1 1 $NetBSD$ @