orangeduck/BuildYourOwnLisp

Erroneous 'whitespace' in printed AST in chapter6_parsing.html

Opened this issue · 1 comments

In the examples of correct output from the parser it says I should get:

lispy> hello
<stdin>:1:1: error: expected whitespace, '+', '-', '*' or '/' at 'h'
lispy> / 1dog
<stdin>:1:4: error: expected one of '0123456789', whitespace, '-', one or more of one of '0123456789', '(' or end of input at 'd'

But I get:

lispy> hello
<stdin>:1:1: error: expected '+', '-', '*' or '/' at 'h'
lispy> / 1dog
<stdin>:1:4: error: expected one of '0123456789', '-', one or more of one of '0123456789', '(' or end of input at 'd'

You version includes 'whitespace' in the 'expected one of ...' in output for 'hello' and '/ 1dog' and this is not included in the actual program output.

I thought I might have made a typo when typing the program so I downloaded your version of parsing at the end of the chapter, compiled this instead of my version and the difference remains.

I'm using gcc 4.8.5 on Ubuntu Linux 14.04 and the version of mpc.h and mpc.c that I downloaded from the Github repo tonight (17 may).

Thanks - looks like this is due to updates in mpc I will have to take a look into it and see why mpc is reporting errors differently now.