parse(S) :- atom_chars(S,Chars), string(Chars, []). % parser6.pl

string --> as.

as --> [a], {writeln('got an a')}, as.
as --> [], {writeln('empty match')}.
