Search code examples
grammarbnfjebnfll-grammar

J programming language (E)BNF


I'm writing a paper for my Programming Languages and Compilers course about the J programming language. Since it's a relatively unknown (but interesting) programming language, I'm having trouble finding the right documentation and information regarding the formal grammar of J in (E)BNF, some open-source implementations of J, especially lexical analyzers and parsers.

Does anyone know of an accurate source for an (E)BNF for the J programming language? If so, is that an LL grammar and can it be "put through" a parser generator?


Solution

  • (E)BNF is a notation technique for context-free grammars. But J is a context-sensitive language [1,2]. J's parsing rules are listed in the Dictionary II. E [3].

    References:

    1. https://code.jsoftware.com/wiki/Guides/Language_FAQ/J_BNF
    2. http://www.jsoftware.com/pipermail/general/2005-July/023632.html
    3. https://www.jsoftware.com/help/dictionary/dicte.htm