Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Error in Plex

Thread Tools

Error in Plex
Posts: n/a
I got the following error while using Plex

Traceback (most recent call last):
File "", line 1, in ?
from Plex import *
File "D:\python24\lib\site-packages\Plex\", line 34, in ?
from Lexicons import Lexicon, State
File "D:\python24\lib\site-packages\Plex\", line 12, in ?
import DFA
File "D:\python24\lib\site-packages\Plex\", line 9, in ?
import Machines
File "D:\python24\lib\site-packages\Plex\", line 14, in ?
from Transitions import TransitionMap
File "D:\python24\lib\site-packages\Plex\", line 85
def get_epsilon(self,
SyntaxError: Invalid syntax. Assignment to None.

The corresponding source code :


from Plex import *

lexicon = Lexicon([
(Str("Python"), "my_favourite_language"),
(Str("Perl"), "the_other_language"),
(Str("rocks"), "is_excellent"),
(Str("sucks"), "is_differently_good"),
(Rep1(Any(" \t\n")), IGNORE)

filename = "plex1.txt"
f = open(filename, "r")
scanner = Scanner(lexicon, f, filename)
while 1:
token =
print token
if token[0] is None:

The error was removed when I used the following code in

def get_epsilon(self,
none = None):
Return the mapping for epsilon, or None.
return self.special.get('', None)

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plex 708A Won't Read CDs Boris DVD Video 11 02-18-2007 04:34 PM
ANN: Plex 1.1.5 greg Python 1 01-28-2007 01:18 AM
flex: plex? Peter Kleiweg Python 4 08-17-2004 11:39 PM
Plex PX 708 UF Verses Sony DRX-530 UL Mike L. DVD Video 0 04-24-2004 02:46 PM
COOL Plex/ CONTRACT/ IMMEDIATE news Java 0 08-07-2003 10:33 PM