A collection of leex and yecc definitions, along with tests
Erlang
Latest commit f918f45 Aug 8, 2008 Chris Anderson added usage example to readme
Permalink
Failed to load latest commit information.
leex
.gitignore
README
json_eep.erl output a string instead of a binary Aug 8, 2008
json_grammar.erl
json_grammar.yrl
json_lex2.erl
json_lex2.xrl
leex.erl
leex.txt
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\"}]"