From cba88f45e53158056a86bb70b2236610711c3b84 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Wed, 20 Aug 2014 19:11:05 -0500
Subject: [PATCH] Derive lexer errors from Exception

---
 pytools/lex.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pytools/lex.py b/pytools/lex.py
index a47ea45..5ca5b1d 100644
--- a/pytools/lex.py
+++ b/pytools/lex.py
@@ -1,7 +1,7 @@
 import re
 
 
-class RuleError:
+class RuleError(RuntimeError):
     def __init__(self, rule):
         self.Rule = rule
 
@@ -9,7 +9,7 @@ class RuleError:
         return repr(self.Rule)
 
 
-class InvalidTokenError:
+class InvalidTokenError(RuntimeError):
     def __init__(self, s, str_index):
         self.string = s
         self.index = str_index
-- 
GitLab