Age | Commit message (Collapse) | Author | Files | Lines |
|
Remove keywordRegex, it is not used now. To do: make sure that ID not
match keywords, implement parseExp.
|
|
|
|
Add a next() function that returns the next scanned token and match() to
consume the token from input. next() takes an automaton such that you
can match "begin" in the beginning, but any other string (including
"begin" prefixes) for ID.
|
|
NAT and ID regexes were taken from RegexTest.java. Tests are added
before the implementation (test-driven development).
|
|
|
|
|
|
|
|
Also remove tests with letters "s" and "Id" in it, these are not
interesting to test. Add some more tests to catch capital "E" and reject
a lone "e7".
|
|
|
|
|
|
Signed-off-by: andrea <andrea.evangelista.1989@gmail.com>
|
|
|
|
|
|
|
|
Do not look for longest match, but for the exact match. Documented at
http://www.brics.dk/automaton/doc/dk/brics/automaton/RunAutomaton.html#run%28java.lang.String%29
|
|
...such that the tests can be reviewed based upon the generated output.
(as required for the assignment).
|
|
ID ::= [a-z] [a-z0-9]*
|
|
Unzipped from OASE (2IMP20), excluding the bin/ folder.
size: 158596 bytes
sha256: 179253d2bfec243bc5294372ce0ad1c5d82a30ef32ad108f6c9fd0aee73fe4df assignment1.zip
|