the dfa (deterministic finite automota) library/tool combo builds a dfa table and performs searches against it. step 1) compile the dfa table. dfa -f {asm|c|omf|bin} -o output_file table_name input_file is a file of text to match against and the associated (numeric) value. eg: # this is a comment # some resource types and their values "rIcon" $8001 "rPicture" $8002 "rControlList" $8003 strings should be enclosed in quotes. The quote character itself is not allowed. hexadecimal numbers should be preceded by $ or 0x. Otherwise, base 10 is assumed. the -f flag determines if the dfa table is output as c code, asm code (suitable for compiling/assembling), raw binary code, or a linkable omf file. For c code, asm code, or the omf file, the table will be named . If or are missing, the utility will read and/or write to stdin/stdout respectively. step 2) match against it. extern pascal Word MatchDFA(const void *dfa, const char *text, Word *value); extern char my_dfa_table[]; if the text can be matched against the dfa table, MatchDFA will return the number of characters matched and *value will be set to the value associated with the string matched. If no match can be found, 0 will be returned. The input text should be a c-string (null terminated).