In order to test out your own implementation, be sure to design test cases that cover all possible lexical rules as defined in the spec.
The first fundamental principle of testing is to make sure that every line of code is exercised. To do this, you should first make sure that you test for every keyword and punctuation mark listed in the tables.
Next, look at each rule one by one, building up your test cases from simple examples, and thereby assure yourself that the a larger test parsed correctly. For Example, QName is defined as follows:
QName ::= ( Letter | "_" ) ( Letter | Digit | "." | "-" | "_" )*
It follows that you must test out each alternative within each parenthesized subexpression of QName
Thus, there are 2 alternatives in
( Letter | "_" )
( Letter | Digit | "." | "-" | "_" )*
Now, you ask if one should test for many "repetitions" of Kleene closure What do you think?
You may use the lexical spec as a guide to help organize your testing.
The second principle if testing is that all possible paths, through the code must be executed. You won't likely be able to test all such paths--there are too many of them-- but you can still test a meaningful number of paths of some designated length.
This systematic approach will go a long way to covering many test cases.