json - abnf parser with node js -
can 1 suggest how parse text using abnf grammar?
installed abnf module. have grammar in abc.abnf file. have text content in abc.txt file. successful in validating grammar. want content in abc.txt need validated against abc.abnf grammar.
i want convert below text message json after parsing/validating...
input text
dms/6
dinesh-sr.anlayst/12345678
dbms/plsql/joins
datastructure/tress/graphs
{
"message": "dms",
"version": "6"
"employee": {
"name":"dinesh",
"designation": "sr,analyst",
"contact": "12345678"
}
"skills": {
"dbms": {
"plsql",
"joins"
},
"datastructure": {
"trees",
"graphs"
}
}
}
====
grammar tried
dms = messageinfo
employe
e skills;
messageinfo = messageidentifier
slant
version
crlf;
employee =
name
hyphen
designation
slant
contact;
skils =
5skill;
skill =
subject
expert1
expert2;
name=10alpha
designation=20alpha
contact=10numeric
subject=10alpha
expert1=10alpha
expert2=10alpha;
messageidentifier ="dms";
slant = "/";
crlf = %x0d;
version = "5";
alpha = %x41-5a;
hyphen = "-";
numeric= %x30-39;
Comments
Post a Comment