public class AtomicPetriNetBuilder
extends java.lang.Object
| Constructor and Description |
|---|
AtomicPetriNetBuilder() |
| Modifier and Type | Method and Description |
|---|---|
static PetriNet<AtomicEvent> |
parseFromString(java.util.Scanner scanner)
Defines the Petri net from a structured string.
|
public static PetriNet<AtomicEvent> parseFromString(java.util.Scanner scanner) throws java.text.ParseException
T T1 p1 P p1 T2 T T2 p2 P p2 T3 M p1 0 M p2 0The order in which lines are input does not matter: transitions and places are created the first time their label is seen by the parser.
Caveat emptor: the parser assumes the string is well-formed but does not check it. A malformed string will likely cause a runtime error of some kind.
scanner - A scanner to an input stringjava.text.ParseExceptionCopyright © Sylvain HallĂ©. All Rights Reserved.