Commit Graph

15 Commits

Author SHA1 Message Date
Jean-Sébastien Pédron
78671683ea Import last cleanups from "bones"
Mostly:
    o  updates to autotools files
    o  removal of $Id$ and $Revision
    o  cleanups of Debian package
2011-06-29 17:15:01 +02:00
Jean-Sébastien Pédron
9bb39d11b3 Fix several warnings reported by Dialyzer
All warnings were fixed. The next step is to experiment with PLT
building.
2011-06-01 09:51:40 +02:00
Jean-Sébastien Pédron
f757c4674d Rework headers by isolating private ones
The private headers are now in "include/internal". They're still
installed because they are needed by dialyzer.
2011-05-31 16:41:43 +02:00
Jean-Sébastien Pédron
b62b23c21b Move error handling to yaml_errors
Error records were redefined:
    o  #yaml_invalid_option{}
    o  #yaml_parsing_error{}

An exception now has always the form:
    #yaml_exception{errors = [
        #yaml_invalid_option{} | #yaml_parsing_error{}
      ]}

This new #yaml_exception{} record is public and can be accessed
directly. But the yaml_errors module provides functions to get only
errors or warnings.
2011-05-31 16:33:03 +02:00
Jean-Sébastien Pédron
89189a067a Preload Core Schema modules
This is done once when the application starts instead of during each
call to yaml_repr:represent/2.
2011-05-27 16:06:17 +02:00
Jean-Sébastien Pédron
22096bb951 Declare all node records 2011-05-24 15:04:55 +02:00
Jean-Sébastien Pédron
a8c526a02c Declare new option "default_tags" 2011-05-24 15:03:52 +02:00
Jean-Sébastien Pédron
0c00ba974e Declare the record #unfinished_node 2011-05-24 15:02:36 +02:00
Jean-Sébastien Pédron
b29f36e94d Move data specification types to yaml_types.hrl 2011-05-24 15:01:07 +02:00
Jean-Sébastien Pédron
27b0bfd485 First version of representation layer
This first version knows how to represent:
    o  sequence and mapping
    o  sting
    o  Erlang anonymous function
2011-03-29 12:25:52 +02:00
Jean-Sébastien Pédron
b0404a0290 Move supported versions declaration
Supported versions declaration is moved from "yaml_tokens.hrl" to
"yaml_parser.hrl" because it's used there.
2011-03-29 10:34:33 +02:00
Jean-Sébastien Pédron
fdadcf4500 Add yaml_parser_token_fun() spec
Add a yaml_parser_token_fun() spec. It corresponds to the callback
function called for each emitted token. It's used by the "token_fun"
parser option.
2011-03-23 16:19:25 +01:00
Jean-Sébastien Pédron
362ee1d6d3 Add option to force document version
The document version can be forced using the following option:
  {doc_version, {Major, Minor}}
where Major and Minor are positive integers.

When this option is specified, {Major, Minor} will be used, even if a
%YAML directive indicates another version.
2011-03-22 17:29:08 +01:00
Jean-Sébastien Pédron
919d6562bf Check for the minimum supported version
The parser doesn't support version below YAML 1.1: raise an error
if the document if 1.0 or below.
2011-03-22 15:59:28 +01:00
Jean-Sébastien Pédron
120ef7ea16 Initial version of a YAML 1.2 parser
This parser is written against the YAML 1.2 specification. It may
therefore be used as a JSON parser as well.

The project is an Erlang application. The module "yaml_parser" parses a
YAML source (a string, a file, whatever) and runs a callback function
for each token scanned. It's more or less like a SAX XML parser.

The testsuite provided isn't complete yet, though it contains all the
example found in the specification.
2011-03-07 11:43:52 +01:00