Unicon Pattern Finishing-Up Page

Overarching goal: actually finish/ratify PatternType for Unicon version 13.
add ^ and $ to regexes.
aliases for Pos(1) / Rpos(0) ?
runtime regex-to-pattern construction
do the equivalent of what unicon translator does for regex, parsing and constructing a pattern value. Status: I have carved out a YACC file for regular expressions, and prototyped a function that takes a string and parses it using said grammar (rel.y, regular expression library). Next step is to "fix" parse trees produced by said grammar to be amenable to constructing a pattern during a tree traversal.
demo ucover meeting requirements on tests/pattern
print out a table that shows me, for the tests/pattern test suite, how many times the various pattern facilities are called, and whether they are called with diverse inputs such that they are made to fail or runerr, etc.
Write coverage tests for regular expression pattern matches
Tests need to be added to tests/pattern for the regular expression syntax
Write coverage tests for pattern operators and functions
Start by assessing what is covered in tests/pattern, and amend it with missing tests. Double-check John Goettsche's thesis for tests needed in tests/pattern.
Better preserve line numbers in generated pattern code!
Emit more $line directives. Maybe column numbers too?
Improve pattern documentation, add examples
Examples for regular expressions in Unicon.
The user's guide and language reference documentation for the pattern facilities needs updating and merging.
Make regular expressions "greedy" about how big a pattern they will match. (DrJ)
The quintessential example of this is
     procedure main()
        s := "hello there"
	r := 
	write(image(s??r))
     end
We could use a constructed pattern that when executed does something like this. This one would work if unevaluated expressions could be generators, something not currently supported.
procedure greedy(p)
local L := [], startpos := &pos
   write("s is ",&subject)
   write("     ",repl("-",startpos-1),"^")
   every x := =p do {
      put(L, [x, &pos])
   }
   while pair := pull(L) do {
      &pos := pair[2]
      suspend &subject[startpos : &pos]
   }
   &pos := startpos
end
A more primitive "longest match" formulation would be something like
(tmplen:=0,(every tmplen <:= *(tmps:= =p)|1,tmps)
What about
procedure greedy(p)
   if s := =p then suspend s||greedy(p) else suspend ""
end
specific tests/pattern tests need validation and expected output files:
Most of these are done, a few are problematic.