Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# xmlautomata

## Name

xmlautomata --

## Synopsis

    struct      xmlAutomata;
    typedef     xmlAutomataPtr;
    struct      xmlAutomataState;
    typedef     xmlAutomataStatePtr;
    xmlAutomataPtr xmlNewAutomata               (void);
    void        xmlFreeAutomata                 (xmlAutomataPtr am);
    xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am);
    int         xmlAutomataSetFinalState        (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr state);
    xmlAutomataStatePtr xmlAutomataNewState     (xmlAutomataPtr am);
    xmlAutomataStatePtr xmlAutomataNewTransition
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 void *data);
    xmlAutomataStatePtr xmlAutomataNewCountTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 int min,
                                                 int max,
                                                 void *data);
    xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 int min,
                                                 int max,
                                                 void *data);
    xmlAutomataStatePtr xmlAutomataNewAllTrans  (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int lax);
    xmlAutomataStatePtr xmlAutomataNewEpsilon   (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to);
    xmlAutomataStatePtr xmlAutomataNewCountedTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);
    xmlAutomataStatePtr xmlAutomataNewCounterTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);
    int         xmlAutomataNewCounter           (xmlAutomataPtr am,
                                                 int min,
                                                 int max);
    xmlRegexpPtr xmlAutomataCompile             (xmlAutomataPtr am);
    int         xmlAutomataIsDeterminist        (xmlAutomataPtr am);

## Description

## Details

### struct xmlAutomata

    struct xmlAutomata;

### xmlAutomataPtr

A libxml automata description, It can be compiled into a regexp

### struct xmlAutomataState

    struct xmlAutomataState;

### xmlAutomataStatePtr

A state int the automata description,

### xmlNewAutomata ()

    xmlAutomataPtr xmlNewAutomata               (void);

Create a new automata

Returns : |

### xmlFreeAutomata ()

    void        xmlFreeAutomata                 (xmlAutomataPtr am);

Free an automata

`am` : |

### xmlAutomataGetInitState ()

    xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am);

Initial state lookup

`am` : |
Returns : |

### xmlAutomataSetFinalState ()

    int         xmlAutomataSetFinalState        (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr state);

Makes that state a final state

`am` : |
`state` : |
Returns : |

### xmlAutomataNewState ()

    xmlAutomataStatePtr xmlAutomataNewState     (xmlAutomataPtr am);

Create a new disconnected state in the automata

`am` : |
Returns : |

### xmlAutomataNewTransition ()

    xmlAutomataStatePtr xmlAutomataNewTransition
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 void *data);

If `to` is NULL, this create first a new target state in the automata and then adds a transition from the `from` state to the target state activated by the value of `token`

`am` : |
`from` : |
`to` : |
`token` : |
`data` : |
Returns : |

### xmlAutomataNewCountTrans ()

    xmlAutomataStatePtr xmlAutomataNewCountTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 int min,
                                                 int max,
                                                 void *data);

If `to` is NULL, this create first a new target state in the automata and then adds a transition from the `from` state to the target state activated by a succession of input of value `token` and whose number is between `min` and `max`

`am` : |
`from` : |
`to` : |
`token` : |
`min` : |
`max` : |
`data` : |
Returns : |

### xmlAutomataNewOnceTrans ()

    xmlAutomataStatePtr xmlAutomataNewOnceTrans (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 const xmlChar *token,
                                                 int min,
                                                 int max,
                                                 void *data);

If `to` is NULL, this create first a new target state in the automata and then adds a transition from the `from` state to the target state activated by a succession of input of value `token` and whose number is between `min` and `max`, moreover that transistion can only be crossed once.

`am` : |
`from` : |
`to` : |
`token` : |
`min` : |
`max` : |
`data` : |
Returns : |

### xmlAutomataNewAllTrans ()

    xmlAutomataStatePtr xmlAutomataNewAllTrans  (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int lax);

If `to` is NULL, this create first a new target state in the automata and then adds a an ALL transition from the `from` state to the target state. That transition is an epsilon transition allowed only when all transitions from the `from` node have been activated.

`am` : |
`from` : |
`to` : |
`lax` : |
Returns : |

### xmlAutomataNewEpsilon ()

    xmlAutomataStatePtr xmlAutomataNewEpsilon   (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to);

If `to` is NULL, this create first a new target state in the automata and then adds a an epsilon transition from the `from` state to the target state

`am` : |
`from` : |
`to` : |
Returns : |

### xmlAutomataNewCountedTrans ()

    xmlAutomataStatePtr xmlAutomataNewCountedTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);

If `to` is NULL, this create first a new target state in the automata and then adds an epsilon transition from the `from` state to the target state which will increment the counter provided

`am` : |
`from` : |
`to` : |
`counter` : |
Returns : |

### xmlAutomataNewCounterTrans ()

    xmlAutomataStatePtr xmlAutomataNewCounterTrans
                                                (xmlAutomataPtr am,
                                                 xmlAutomataStatePtr from,
                                                 xmlAutomataStatePtr to,
                                                 int counter);

If `to` is NULL, this create first a new target state in the automata and then adds an epsilon transition from the `from` state to the target state which will be allowed only if the counter is within the right range.

`am` : |
`from` : |
`to` : |
`counter` : |
Returns : |

### xmlAutomataNewCounter ()

    int         xmlAutomataNewCounter           (xmlAutomataPtr am,
                                                 int min,
                                                 int max);

Create a new counter

`am` : |
`min` : |
`max` : |
Returns : |

### xmlAutomataCompile ()

    xmlRegexpPtr xmlAutomataCompile             (xmlAutomataPtr am);

Compile the automata into a Reg Exp ready for being executed. The automata should be free after this point.

`am` : |
Returns : |

### xmlAutomataIsDeterminist ()

    int         xmlAutomataIsDeterminist        (xmlAutomataPtr am);

Checks if an automata is determinist.

`am` : |
Returns : |

<<< Previous Page | Home | Up | Next Page >>>
xmlregexp | xmlunicode