From 47beb371495f910bddb285dfe63ff1b00dade1d9 Mon Sep 17 00:00:00 2001 From: alex_nanou Date: Thu, 18 Nov 2004 09:04:36 +0000 Subject: [PATCH] *** empty log message *** --- CHANGES | 2 +- PKG-INFO | 2 +- pli/functional.py | 2 +- pli/logictypes.py | 49 ++++++++++++++++++++++++++++++++++++++++++++-- pli/pattern/state/fsm.py | 22 +++++++++++++++++++-- pli/pattern/store/store.py | 2 +- 6 files changed, 71 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 5f6678a..d3d4a53 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,4 @@ -# this file was generated on [200410290045] +# this file was generated on [200411181206] pli changes: version 0.0.109 (200410170040): diff --git a/PKG-INFO b/PKG-INFO index f06d9f4..5703608 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pli -Version: 0.0.125 +Version: 0.0.126 Summary: PLI: a utility library for the Python language. Home-page: http://pli.sourceforge.net/ Author: Alex A. Naanou diff --git a/pli/functional.py b/pli/functional.py index 8d477db..af57e13 100644 --- a/pli/functional.py +++ b/pli/functional.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.5.14''' -__sub_version__ = '''20041026153457''' +__sub_version__ = '''20041101000543''' __copyright__ = '''(c) Alex A. Naanou 2003''' diff --git a/pli/logictypes.py b/pli/logictypes.py index 0d9e06d..25deabf 100755 --- a/pli/logictypes.py +++ b/pli/logictypes.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.1.07''' -__sub_version__ = '''20041029004526''' +__sub_version__ = '''20041116002755''' __copyright__ = '''(c) Alex A. Naanou 2003''' __doc__ = '''\ @@ -54,8 +54,53 @@ MINIMUM = _Compare(-1) #----------------------------------------------------------------------- +# this is to define basic pattern combination mathematics. +# Ex: +# Pab = Pa | Pb -- Pab is a pattern that will match either Pa +# or Pb... +# +# Operations: +# | +# & +# + +# rep +# not +# +# +class Pattern(object): + ''' + ''' + # cmp + def __eq__(self, other): + ''' + ''' + pass + def __ne__(self, other): + ''' + ''' + pass + def __gt__(self, other): + ''' + ''' + pass + def __ge__(self, other): + ''' + ''' + pass + def __lt__(self, other): + ''' + ''' + pass + def __le__(self, other): + ''' + ''' + pass + # op + ##!!! + + #--------------------------------------------------------------oftype--- -class oftype(object): +class oftype(Pattern): ''' this will create an object that can be used as a predicate to test type, and it will copare True to objects of that type. diff --git a/pli/pattern/state/fsm.py b/pli/pattern/state/fsm.py index 315d00e..d635c22 100644 --- a/pli/pattern/state/fsm.py +++ b/pli/pattern/state/fsm.py @@ -1,7 +1,7 @@ #======================================================================= -__version__ = '''0.3.17''' -__sub_version__ = '''20040802180146''' +__version__ = '''0.3.19''' +__sub_version__ = '''20041118120308''' __copyright__ = '''(c) Alex A. Naanou 2003''' @@ -521,6 +521,8 @@ class State(FiniteStateMachine): ## ''' ## pass # Q: does this need to be __gatattr__ or __getattribute__ ???? + # NOTE: this might make the attr access quite slow... + # Q: is there a faster way??? (via MRO manipulation or something...) def __getattr__(self, name): ''' this will proxy the attr access to the original startup class.... @@ -533,6 +535,22 @@ class State(FiniteStateMachine): raise AttributeError, '%s object has no attribute "%s"' % (self, name) +#--------------------------------------------------------InitialState--- +class InitialState(State): + ''' + ''' + __is_initial_state__ = True + __ignore_registration__ = True + + +#-------------------------------------------------------TerminalState--- +class TerminalState(State): + ''' + ''' + __is_terminal_state__ = True + __ignore_registration__ = True + + #======================================================================= # vim:set ts=4 sw=4 nowrap : diff --git a/pli/pattern/store/store.py b/pli/pattern/store/store.py index dbbaf07..17c375c 100644 --- a/pli/pattern/store/store.py +++ b/pli/pattern/store/store.py @@ -1,7 +1,7 @@ #======================================================================= __version__ = '''0.0.49''' -__sub_version__ = '''20041026143903''' +__sub_version__ = '''20041031230609''' __copyright__ = '''(c) Alex A. Naanou 2003''' -- 2.11.4.GIT