Giter Site home page Giter Site logo

cl-toml's People

Contributors

cxxxr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cl-toml's Issues

Weird issue with strings

This is probably human error on my part, as I'm a CL newbie, but I am having issues with string values read from a TOML file being unacceptable to various functions in widely used libraries. For example, I load a hostname for a server to bind to and pass it to usocket:socket-server, and get a type-case error saying something like "127.0.0.1" is not a SIMPLE-STRING. Similar results if I read a path to a cert and try to pass it to cl+ssl:make-ssl-server-stream.

Everything I try in the repl says that they are strings, and that they are EQUAL to working strings I have entered by hand. They work properly if I encode and decode them through babel: (babel:octets-to-string (babel:string-to-octets bad-string)).

I'm sure I'm doing something wrong here, but I can't see what.

Parser Chokes On TOML Data Ending In A Comment

Hello! In using this library I ran across a small issue with a TOML file I was parsing.

Data that doesn't end in a comment works:

(defparameter *toml-data* "outcome = \"This works\"")
(cl-toml:parse *toml-data*)
#<HASH-TABLE :TEST EQUAL :COUNT 1 {10065DCB63}>

But when the data ends in a comment, like this:

(defparameter *toml-data* "outcome = \"This doesn't\"
# Add more here...")
(cl-toml:parse *toml-data*)

I get this error:

At

  outcome = "This doesn't"
  # Add more here...
  ^ (Line 2, Column 0, Position 25)

In context TOPLEVEL:

While parsing TOPLEVEL. Expected:

     the character #1=Newline
  or the character Space
  or the character " (QUOTATION_MARK)
  or the character # (NUMBER_SIGN)
  or the character [ (LEFT_SQUARE_BRACKET)
  or any character satisfying BARE-KEY-CHARACTER-P
  or <end of input>
  or anything but the character #1#
   [Condition of type ESRAP:ESRAP-PARSE-ERROR]

Which is odd because the character it's complaining about is certainly a "# (NUMBER_SIGN)" like it's expecting. Again, this only happens when the last line of the TOML is a comment.

Please let me know if you need any more information or help debugging the issue.

Thanks,
Brooks J Rady

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.