Annotation-System/hmmlib-js/src/header.js

41 lines
750 B
JavaScript
Raw Normal View History

function HMML_parse(contents) {
var l = new HMMLexer();
var state = {
line: 0,
annos: [],
meta: {
annotators: [],
guests: [],
co_hosts: []
},
an: {
line: 0,
text: "",
references: [],
markers: [],
},
2017-06-19 17:23:17 +00:00
ref: {},
first: true
};
l.setInput(contents, state);
try {
var r;
do {
r = l.next();
} while (!r);
return {
metadata: state.meta,
annotations: state.annos
};
} catch (e) {
return {
error: e
};
}
}
function HMMLexer() {}
/* generated by jison-lex 0.3.4 */
HMMLexer.prototype = {