I am trying to port a grammar from pegjs and it says it is an abnf grammar. I does not work the grammar starts like this:
/* ----- A.1 Lexical Grammar ----- */
SourceCharacter
= .
WhiteSpace “whitespace”
= “\t”
/ “\v”
/ “\f”
/ ” ”
/ “\u00A0”
/ “\uFEFF”
/ Zs
LineTerminator
= [\n\r\u2028\u2029]
What is this and can I translate it to something Instaparse understands?
Looks nothing like the example abnf here https://en.m.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form
The "whitespace" (quoted like a terminal?) on the left of the = is like no grammar I've seen before
Ah, pegjs has its own grammar syntax, what you are likely looking at is the grammar for abnf grammars, written in the pegjs grammar syntax
Thank You - So it looks like I need to figure out pegjs grammar and manually translate to abnf