Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistencies between ABNF spec and test JSON #1

Open
dmolesUC opened this issue Jan 12, 2021 · 0 comments
Open

Inconsistencies between ABNF spec and test JSON #1

dmolesUC opened this issue Jan 12, 2021 · 0 comments

Comments

@dmolesUC
Copy link

I'm working on a Ruby MARCspec parser using Parslet where the parse rules are 1:1 with the ABNF rules, and using the MARCspec-Test-Suite JSON to generate test cases.

In doing so, I've run across a few inconsistencies in trying to guess the parse rule name from the suite file name:

  • indicators — ((^[12]$)) — the ABNF has:

    abrIndicatorSpec  = [index] "^" ("1" / "2")
    

    but doesn't call out ("1" / "2") as a separate indicators rule.

  • subfield ranges (^((?:(?:[a-z]\-[a-z])|(?:[0-9]\-[0-9])))$) — the ABNF has

    subfieldCodeRange = "$" ( (alphalower "-" alphalower) / (DIGIT "-" DIGIT) )
    

    but doesn't call out ( (alphalower "-" alphalower) / (DIGIT "-" DIGIT) ) as a separate subfieldRange rule.

  • subfield tags (^([\!-\?\[-\{\}-~])$) — in the ABNF this is subfieldChar, not subfieldTag.

None of these is that hard to work around (for the first two I extracted additional parse rules, and for the third I just put a special case in my test case generation code) but I wanted to bring them to your attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant