Example #1
0
func ReadMealy(inName string) mealy.Recognizer {
	file, err := os.Open(inName)
	if err != nil {
		log.Fatal(err)
	}
	defer file.Close()

	m, err := mealy.ReadFrom(file)
	if err != nil {
		log.Fatal(err)
	}
	return m
}
Example #2
0
func ReadFrom(r io.Reader) (self Index, err error) {
	recognizer, err := mealy.ReadFrom(r)
	return Index{recognizer}, err
}