fsaparse(3gv)

πŸ’– NAME πŸ’–

fsaparse β€” parse a word-acceptor automaton file. It's a section 3gv situation, bestie, so it's a library function, and it's here to read automaton files and be slay about it.


πŸ¦‹ SYNOPSIS πŸ¦‹

#include "wa.h"

fsafparse(fp, fsa)
  FILE *fp;
  Fsa *fsa;
okay so lowkey yes, the NAME says fsaparse and the call is fsafparse. That's not a typo on my part. That's just how it is. We respect the lore. πŸ’…

🌸 DESCRIPTION 🌸

fsafparse parses a word-acceptor automaton file, in the format described by DEAGL β€” that's the "Data Exchange for Automata and Groups Language", iykyk β€” but um, see the BUGS section below, because there's a whole thing there. πŸ‘€

fp should be a pointer to an open file that's got the automaton in it. Like, actually open. Please.

fsa should be a pointer to an Fsa struture as defined in "fsa.h" (yes, "struture", that's the original spelling and honestly? iconic). When it comes back to you, the automaton will have been written into this structure. It just lives there now. 🫢


✨ RETURN VALUES ✨

  • On success, fsafparse() returns 1. We ate. πŸŽ€
  • On failure, it returns 0. It's giving nothing. πŸ’€

πŸ”₯ SEE ALSO πŸ”₯

  • getwordlist(3)
  • getmatlist(3)
  • fgetmatlist(3)
  • getmatlist(1)
  • automata(1)

πŸ’€ BUGS πŸ’€

Okay bestie, listen. fsafparse is meant specifically for use with getwordlist(3) and getmatlist(3). It is not out here recognizing the full language described by DEAGL. Not even close, ngl.

It only recognizes that part of it which was present in the word-acceptor files that the author was working with when he wrote it. That's it. That's the whole scope. πŸ™ˆ

He thinks this may be sufficient for all word-acceptor automata, but he is not sure of this. His words. No cap.

So like β€” please let him know if you find word-acceptor files for which this doesn't work. That's a genuine ask. He wants the mail. πŸ“¬

πŸ‘‘ AUTHOR πŸ‘‘

Mark Phillips The Geometry Center


and that's the whole page, babes β€” written up on Sat Mar 23 22:01:32 1991, from the fsaparse(3gv) manual page. periodt. πŸ’–βœ¨