Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A collection of leex and yecc definitions, along with tests

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 leex
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README
Octocat-spinner-32 json_eep.erl
Octocat-spinner-32 json_grammar.erl
Octocat-spinner-32 json_grammar.yrl
Octocat-spinner-32 json_lex2.erl
Octocat-spinner-32 json_lex2.xrl
Octocat-spinner-32 leex.erl
Octocat-spinner-32 leex.txt
Octocat-spinner-32 leexinc.hrl
README
To run the tests for the EEP JSON parser:

# erl

c(leex).

leex:file(json_lex2), c(json_lex2).

yecc:file(json_grammar), c(json_grammar).

c(json_eep).

% Run the tests

json_eep:test().


% To profile the parser:

json_eep:profile().


% Example usage:

E = json_eep:json_to_term("[1,3.14,{\"key\":\"value\"}]").
%-> [1,3.14,{[{<<"key">>,<<"value">>}]}]

json_eep:term_to_json(E).
% "[1,3.14000000000000012434,{\"key\":\"value\"}]"
Something went wrong with that request. Please try again.