J-Burns wrote:
> How can I do this? And if I could do this by some other way than using
> linked lists than do tell me about that as well.
replying to this dead thread mainly for anyone using google. there's now
a python regular expression engine in lepl and the source code can be seen
via http:/
In article ,
andrew cooke wrote:
>Aahz wrote:
>> In article ,
>> andrew cooke wrote:
>>
>>>(I've just noticed that the comments in Sequence are incorrect,
>>>unfortunately - please ignore any mention of "index").
>>
>> s/comments/lies/ per my .sig ;-)
>[...]
>> "At Resolver we've found it useful
Aahz wrote:
> In article ,
> andrew cooke wrote:
>>(I've just noticed that the comments in Sequence are incorrect,
>>unfortunately - please ignore any mention of "index").
>
> s/comments/lies/ per my .sig ;-)
[...]
> "At Resolver we've found it useful to short-circuit any doubt and just
> refer t
In article ,
andrew cooke wrote:
>
>(I've just noticed that the comments in Sequence are incorrect,
>unfortunately - please ignore any mention of "index").
s/comments/lies/ per my .sig ;-)
--
Aahz (a...@pythoncraft.com) <*> http://www.pythoncraft.com/
"At Resolver we've found
J-Burns wrote:
[...]
> and to node 2 with the value of "b". Trying to make something like an
> NFA. Where id be changing regular expressions to NFAs.
>
> How can I do this? And if I could do this by some other way than using
> linked lists than do tell me about that as well.
Just been reminded of
In article ,
Tim Chase wrote:
> In the past, I've done NFA with a state machine:
What I've done at times is have each state be a function. The function
returns an (output, next_state) tuple, and the main loop becomes something
like this:
state = start
for input in whatever:
output, stat
On Mar 21, 10:03 am, Tim Chase wrote:
> >>>transitions = {
> >>> # values are tuples of (newstate, transition_function)
> >>> STATE_A: [
> >>>(STATE_B, lambda x: x > 5),
> >>>(STATE_C, lambda x: x > 10),
> >>>(STATE_D, lambda x: x > 100),
> >>>],
> >>>
On Mar 21, 10:47 am, grocery_stocker wrote:
> On Mar 21, 6:38 am, Tim Chase wrote:
>
>
>
> > > For example, this means that there can be a start node supposedly.
> > > Having a value of 0. It is pointing to node 1 with the value of "a"
> > > and to node 2 with the value of "b". Trying to make som
transitions = {
# values are tuples of (newstate, transition_function)
STATE_A: [
(STATE_B, lambda x: x > 5),
(STATE_C, lambda x: x > 10),
(STATE_D, lambda x: x > 100),
],
STATE_B: [
(STATE_A, lambda x: x < 5),
(STATE_C, lambda x: x > 10)
On Mar 21, 8:47 am, grocery_stocker wrote:
> On Mar 21, 6:38 am, Tim Chase wrote:
>
>
>
> > > For example, this means that there can be a start node supposedly.
> > > Having a value of 0. It is pointing to node 1 with the value of "a"
> > > and to node 2 with the value of "b". Trying to make some
On Mar 21, 6:38 am, Tim Chase wrote:
> > For example, this means that there can be a start node supposedly.
> > Having a value of 0. It is pointing to node 1 with the value of "a"
> > and to node 2 with the value of "b". Trying to make something like an
> > NFA. Where id be changing regular expres
I've done something similar on the past week, regarding RE's and
NFA's: http://code.google.com/p/yaree/
The significant code is on re_fsa.py, on the svn repository. The
implementation is also a dict, of the form: { Node -> { Character ->
Set(Node) } }. That is, it is a mapping of Node's to a mappi
For example, this means that there can be a start node supposedly.
Having a value of 0. It is pointing to node 1 with the value of "a"
and to node 2 with the value of "b". Trying to make something like an
NFA. Where id be changing regular expressions to NFAs.
John has already pointed out the pre
On Mar 21, 8:11 am, "andrew cooke" wrote:
> J-Burns wrote:
snip
> > For example, this means that there can be a start node supposedly.
> > Having a value of 0. It is pointing to node 1 with the value of "a"
> > and to node 2 with the value of "b". Trying to make something like an
> > NFA. Where id
andrew cooke wrote:
[...]
i messed up my example; corrected below (I hope)
> in your case you could use ints for the nodes and a dict([int]) for the
> graph. so:
>
{1: [2,3], 2: [1,3], 3: [3]}
>
> is a graph in which 1 and 2 are connected in each direction, both 1 and 2
> are linked to 3, and 3
J-Burns wrote:
> I need to make a linked list that can do the following:
>
> 1) Point to multiple nodes at one time
> 2) Should have 2 values:
> a) The node no.
> b) The value of that node in reference to the next node that it is
> pointing to
>
> For example, this means that there can be a
On Mar 21, 10:38 pm, J-Burns wrote:
> Hey thr,
>
> I need some help here actually. So i thought i could get it easily
> from here.
>
> I need to make a linked list that can do the following:
>
> 1) Point to multiple nodes at one time
The term "linked list" is usually restricted to a collection of
Hey thr,
I need some help here actually. So i thought i could get it easily
from here.
I need to make a linked list that can do the following:
1) Point to multiple nodes at one time
2) Should have 2 values:
a) The node no.
b) The value of that node in reference to the next node that it i
18 matches
Mail list logo