finished matcher, and problem fixes

Known Bug:
The name duplication detect mechanism is not perfect yet. It currently
couldn't detect name dup in pattern like the following:

     (a (b b b) ...)
    ;      ^-^--------- duplication in ellipsis