[packages/kelbt] - new

qboosh qboosh at pld-linux.org
Wed Jun 11 18:33:25 CEST 2014


commit adcc371c8c23dd4acc72c20c25f7dda61655e285
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Jun 11 18:37:02 2014 +0200

    - new

 kelbt-c++.patch | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 kelbt.spec      | 51 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 121 insertions(+)
---
diff --git a/kelbt.spec b/kelbt.spec
new file mode 100644
index 0000000..1f40350
--- /dev/null
+++ b/kelbt.spec
@@ -0,0 +1,51 @@
+Summary:	Kelbt - backtracking LR parsing
+Summary(pl.UTF-8):	Kelbt - analiza LR z nawrotami
+Name:		kelbt
+Version:	0.15
+Release:	1
+License:	GPL v2+
+Group:		Development/Tools
+Source0:	http://www.complang.org/kelbt/%{name}-%{version}.tar.gz
+# Source0-md5:	c480692e26998edcc8735513c902cecc
+Patch0:		%{name}-c++.patch
+URL:		http://www.complang.org/kelbt/
+BuildRequires:	libstdc++-devel
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Kelbt generates backtracking LALR(1) parsers. Where traditional
+LALR(1) parser generators require static resolution of shift/reduce
+conflicts, Kelbt generates parsers that handle conflicts by
+backtracking at runtime. Kelbt is able to generate a parser for any
+context-free grammar that is free of hidden left recursion.
+
+%description -l pl.UTF-8
+Kelbt generuje analizatory LALR(1) z nawrotami. O ile tradycyjne
+generatory analizatorów LALR(1) wymagają statycznego rozwiązywania
+konfliktów przesunięcie/redukcja, Kelbt generuje analizatory
+obsługujące konflikty poprzez nawroty w trakcie działania. Kelbt
+potrafi wygenerować analizator dla dowolnej gramatyki bezkontekstowej
+pozbawiony ukrytej rekurencji.
+
+%prep
+%setup -q
+%patch0 -p1
+
+%build
+%configure
+%{__make} \
+	CFLAGS="%{rpmcxxflags} -Wall" \
+	LDFLAGS="%{rpmldflags}"
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -D kelbt/kelbt $RPM_BUILD_ROOT%{_bindir}/kelbt
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CREDITS ChangeLog TODO
+%attr(755,root,root) %{_bindir}/kelbt
diff --git a/kelbt-c++.patch b/kelbt-c++.patch
new file mode 100644
index 0000000..1d93438
--- /dev/null
+++ b/kelbt-c++.patch
@@ -0,0 +1,70 @@
+--- kelbt-0.15/aapl/avlcommon.h.orig	2008-10-07 01:04:57.000000000 +0200
++++ kelbt-0.15/aapl/avlcommon.h	2014-06-10 22:14:35.285090439 +0200
+@@ -881,9 +881,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 		}
+ 
+ #ifdef AVL_BASIC
+-		keyRelation = compare( *element, *curEl );
++		keyRelation = this->compare( *element, *curEl );
+ #else
+-		keyRelation = compare( element->BASEKEY(getKey()), 
++		keyRelation = this->compare( element->BASEKEY(getKey()), 
+ 				curEl->BASEKEY(getKey()) );
+ #endif
+ 
+@@ -969,7 +969,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 			return element;
+ 		}
+ 
+-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 ) {
+@@ -1023,7 +1023,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 			return element;
+ 		}
+ 
+-		keyRelation = compare(key, curEl->getKey());
++		keyRelation = this->compare(key, curEl->getKey());
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 ) {
+@@ -1058,7 +1058,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTr
+ 	long keyRelation;
+ 
+ 	while (curEl) {
+-		keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++		keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+ 
+ 		/* Do we go left? */
+ 		if ( keyRelation < 0 )
+--- kelbt-0.15/aapl/bstcommon.h.orig	2008-10-07 01:04:57.000000000 +0200
++++ kelbt-0.15/aapl/bstcommon.h	2014-06-10 22:13:35.791758345 +0200
+@@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(key, GET_KEY(*mid));
++		keyRelation = this->compare(key, GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
+@@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTab
+ 		}
+ 
+ 		mid = lower + ((upper-lower)>>1);
+-		keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
++		keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+ 
+ 		if ( keyRelation < 0 )
+ 			upper = mid - 1;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kelbt.git/commitdiff/adcc371c8c23dd4acc72c20c25f7dda61655e285



More information about the pld-cvs-commit mailing list