uhmanoa-transpiler-project / shaka-scheme

The official repository for the UH Manoa Transpiler Project's Scheme interpreter, Shaka Scheme.
32 stars 24 forks source link

Parsing of < symbol is broken #18

Closed btwooton closed 7 years ago

btwooton commented 7 years ago

I am trying to get all of the numeric predicates integrated into our REPL program. When I attempt to evaluate:

>>> (< 4 5)

at the REPL I get the following parser error

Parser.parse_token: invalid token libc++abi: terminating input with uncaught exception of type char const*

Upon inspection of the Tokenizer.h file, I found a function with the following signature:

bool is_special_initial (char c)

In the body of this function, we check if the character is equal to a number of characters. I discovered that we were checking if c == '>' twice. I changed one of these to be c == '<' hoping that would fix the issue. Unfortunately, this did not fix the parser error. I am going to try and investigate further to see if I can find source of the issue. As I am mostly unfamiliar with the structure of the parser code, any assistance that I could get in this matter would be much appreciated.

btwooton commented 7 years ago

Ok, turns out I was trying to edit the wrong file. I was looking at the files in src/parser, not realizing we were using the files in src/core/parser. Fixing that one line of code in is_special_initial fixed the problem. Closing issue.

-Troy