Richard Harrington
|
c4643b285d
|
removed unused 'merge-tokens' function (logic is now in disambiguate-minus-signs
|
2013-07-16 18:24:12 -04:00 |
|
Richard Harrington
|
c1afcd9d79
|
changed parse-token to loop and recur
|
2013-07-16 17:54:42 -04:00 |
|
Richard Harrington
|
b136663305
|
pulled the disambiguation of minus signs out of the parsing step, put it afterwards
|
2013-07-16 15:14:06 -04:00 |
|
Richard Harrington
|
6b609f1f94
|
refactored return-err function to use 'constantly'
|
2013-07-16 12:13:45 -04:00 |
|
Richard Harrington
|
31ff2272e2
|
fixed bug in regex in valid-word function
|
2013-07-16 12:11:53 -04:00 |
|
Richard Harrington
|
2cadd6a277
|
changed str-int to use try/catch instead of a regular expression check
|
2013-07-16 12:04:10 -04:00 |
|
Richard Harrington
|
ae1c991310
|
inlined the function adding pos metadata to lexed tokens
|
2013-07-16 12:01:53 -04:00 |
|
Richard Harrington
|
32578ebcef
|
regularized the declaration of the operators so it's a set of strings like everything else
|
2013-07-16 11:51:58 -04:00 |
|
Richard Harrington
|
242c36c104
|
literalized the declaration of the set of registers
|
2013-07-16 11:51:32 -04:00 |
|
Richard Harrington
|
92d918fef3
|
Merge branch 'kevinscodereview'
|
2013-07-16 11:27:08 -04:00 |
|
Richard Harrington
|
8c2a8f7841
|
chose for comprehension with :let and :when bindings option for parse-token
|
2013-07-16 11:26:36 -04:00 |
|
Richard Harrington
|
0db4cf7f7a
|
imported kevin's three token-parser choices into core.clj
|
2013-07-16 11:20:26 -04:00 |
|
Richard Harrington
|
4d368578cb
|
separated out the comment-stripping step completely from the lexing step
|
2013-07-14 23:01:37 -04:00 |
|
Richard Harrington
|
b5c392114a
|
refactored re-seq-with-pos ONE MORE TIME
|
2013-07-14 23:01:11 -04:00 |
|
Richard Harrington
|
1aedb1ee29
|
refactored re-seq-with-pos AGAIN
|
2013-07-14 16:59:43 -04:00 |
|
Richard Harrington
|
9e391344da
|
refactored re-seq-with-pos to be more elegant, possibly slightly slower
|
2013-07-13 15:35:56 -04:00 |
|
Richard Harrington
|
3b03274c2e
|
added back stripping of comments which had been lost when switching to regex
|
2013-07-13 13:29:36 -04:00 |
|
Richard Harrington
|
b0c4f798ec
|
refactored re-find to re-matches for whole words
|
2013-07-13 13:10:43 -04:00 |
|
Richard Harrington
|
90152aa425
|
minor refactoring of adding operators to set of commands
|
2013-07-13 13:06:48 -04:00 |
|
Richard Harrington
|
0ca4fac91c
|
Merge branch 'lex-re'
|
2013-07-13 13:00:56 -04:00 |
|
Richard Harrington
|
0df38b12b8
|
finished converting the lexer to regexp, eliminating need for core.match
|
2013-07-13 13:00:38 -04:00 |
|
Richard Harrington
|
f2dce5fe2a
|
Revert "incredibly minor whitespace issue" -- this was a mistake
This reverts commit cdfb630712 .
|
2013-07-13 12:22:03 -04:00 |
|
Richard Harrington
|
5cbda73aba
|
halfway towards converted the lexer to just use regular expressions
|
2013-07-13 12:17:09 -04:00 |
|
Richard Harrington
|
cdfb630712
|
incredibly minor whitespace issue
|
2013-07-13 12:16:25 -04:00 |
|
Richard Harrington
|
0d8cb73924
|
imported clojure.string/split and join
|
2013-07-13 12:16:02 -04:00 |
|
Richard Harrington
|
7337fa36cd
|
wrote new tests for multi-token parsing
|
2013-07-13 11:26:42 -04:00 |
|
Richard Harrington
|
05459307c7
|
changed return value of parser's error helper function to actual error message
|
2013-07-13 10:59:13 -04:00 |
|
Richard Harrington
|
aae1c0b8c1
|
got parsing of lexed programs working
|
2013-07-13 02:46:56 -04:00 |
|
Richard Harrington
|
4469725e6c
|
wrote tests for parse-token and its helper functions
|
2013-07-13 00:10:33 -04:00 |
|
Richard Harrington
|
76ada03ca4
|
wrote parse-token function to parse a single lexed token
|
2013-07-12 23:49:26 -04:00 |
|
Richard Harrington
|
08f6950203
|
changed name of lexing token key from token to token-str
|
2013-07-12 23:48:28 -04:00 |
|
Richard Harrington
|
cd7a707b6a
|
added list of commands data structure, for parser
|
2013-07-12 17:42:01 -04:00 |
|
Richard Harrington
|
1d703dd693
|
refactored to destructure head and tail in lexer
|
2013-07-12 17:41:31 -04:00 |
|
Richard Harrington
|
8e98cbfe63
|
got rid of old commented-out code
|
2013-07-12 17:40:36 -04:00 |
|
Richard Harrington
|
b0fe08bd80
|
got rid of extraneous digit? function
|
2013-07-12 17:38:56 -04:00 |
|
Richard Harrington
|
907d4d36d4
|
removed ability to distinguish between unary and binary '-' operators in lexing function
|
2013-07-11 15:25:38 -04:00 |
|
Richard Harrington
|
ee84ffedbf
|
added support for multi-line lexing
|
2013-07-11 15:05:38 -04:00 |
|
Richard Harrington
|
757210e3c2
|
changed :column to :pos in metadata
|
2013-07-11 14:58:02 -04:00 |
|
Richard Harrington
|
b8f1af4acf
|
added original robotwar manual from internet
|
2013-07-11 14:54:14 -04:00 |
|
Richard Harrington
|
7b326c33f5
|
added tests for lex function
|
2013-07-08 17:27:03 -04:00 |
|
Richard Harrington
|
76ad864291
|
edited .gitignore file to exclude .swp and .DS_Store files
|
2013-07-08 17:26:40 -04:00 |
|
Richard Harrington
|
08827cf2ca
|
fixed bug in binary operator parsing
|
2013-07-06 03:15:14 -04:00 |
|
Richard Harrington
|
244984ab8f
|
got column numbers working in lexer
|
2013-07-06 02:58:31 -04:00 |
|
Richard Harrington
|
63d396cf80
|
changed partial token in lexer back from string to vector, until it is closed
|
2013-07-06 02:27:13 -04:00 |
|
Richard Harrington
|
a554b68c93
|
got repl working again
|
2013-07-05 19:31:03 -04:00 |
|
Richard Harrington
|
e80adafcc0
|
got version of lex working with core.match
|
2013-07-05 19:30:45 -04:00 |
|
Richard Harrington
|
03a961aac6
|
halfway towards converting to core.match
|
2013-07-05 17:58:35 -04:00 |
|
Richard Harrington
|
896ee4cc52
|
lexing working, except it has incorrect column numbers
|
2013-07-04 13:55:46 -04:00 |
|
Richard Harrington
|
d9f03a10fe
|
very close to getting lexer working
|
2013-07-04 02:47:06 -04:00 |
|
Richard Harrington
|
2c57527919
|
got more cases working in lexer, still not done...
|
2013-07-04 01:15:44 -04:00 |
|