saint-
grammar G {
token TOP { <sentRefEnd> }
token sentFrag { <char>+? <?before <endPunc>> }
token sentRefEnd { <sentFrag> <endPunc> <ref> }
# token sentRefEnd { <char>+? <endPunc> <ref> }
token endPunc { \. }
token char { \w || \s }
token ref { \(\d+\) }
}
my $book = "Hello.(1)";
my $match = G.parse($book);
say $match;INFO