pnathan / pp-toml

Paul's Parser for Tom's Own Minimal Language
https://github.com/mojombo/toml
Other
19 stars 3 forks source link

string with just comments causes error #15

Closed tmccombs closed 9 years ago

tmccombs commented 9 years ago

If you run parse-toml on a string containgin only comments you get a SIMPLE-ESRAP-ERROR complaining a bout an incomplete parse:

At

  ^ (Line 1, Column 0, Position 0)

Incomplete parse.
   [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1003B90003}>)

Backtrace:
  0: (ESRAP::SIMPLE-ESRAP-ERROR " ..)
  1: (ESRAP::PROCESS-PARSE-RESULT #S(ESRAP::RESULT :%PRODUCTION ((NIL NIL)) :POSITION 0) " ..)
  2: (PARSE-STRING " ..)
  3: (PARSE-TOML "#foo ..)
pnathan commented 9 years ago

what is the appropriate behaviour here?

On Wed, Jun 10, 2015 at 10:11 AM, Thayne McCombs notifications@github.com wrote:

If you run parse-toml on a string containgin only comments you get a SIMPLE-ESRAP-ERROR complaining a bout an incomplete parse:

At

^ (Line 1, Column 0, Position 0)

Incomplete parse. [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]

Restarts: 0: [RETRY] Retry SLIME REPL evaluation request. 1: [*ABORT] Return to SLIME's top level. 2: [ABORT] abort thread (#<THREAD "repl-thread" RUNNING {1003B90003}>)

Backtrace: 0: (ESRAP::SIMPLE-ESRAP-ERROR " ..) 1: (ESRAP::PROCESS-PARSE-RESULT #S(ESRAP::RESULT :%PRODUCTION ((NIL NIL)) :POSITION 0) " ..) 2: (PARSE-STRING " ..) 3: (PARSE-TOML "#foo ..)

— Reply to this email directly or view it on GitHub https://github.com/pnathan/pp-toml/issues/15.

tmccombs commented 9 years ago

The behaviour for a string containing only comments and/or whitespace should be the same as for an empty string i.e. an empty hash-table.

pnathan commented 9 years ago

Sorry about that, I should know better to drink coffee before responding to issues.