On Sun, Aug 9, 2009 at 12:48 PM, bill lam<[email protected]> wrote:
> There was lengthy discussion on this subject in the past.  It should
> be impossible.

A full EBNF treatment of the language is impossible, however
we could do most of the language in EBNF.

>  I forgot the detail but I supposed J like human
> language is context dependent and use grammars like
>
> verb noun -> noun
> noun verb noun -> noun
> verb verb -> verb
> verb adverb -> verb
> noun adverb -> verb
> verb ` verb -> gerund

Most of those are not the issue.

The issue is adverbs and conjunctions, which can
produce nouns, verbs, adverbs or conjunctions.

Hypothetically, you could create an adverb (or
conjunction) which had different syntactic properties,
randomly, each time it ran.

For example:
badExample=:1 :0
  select.?4
    case.0 do.0
    case.1 do.1:
    case.2 do. .
    case.3 do. /
  end.
)

   +/ -badExample *
will have one of four outcomes:

|syntax error
+/ 1: *
+/ .*
+// *

Of course this is useless, except to illustrate the point.
But EBNF is not capable of representing this issue.

That said, if you provide up to four different EBNF
options for conjunctions like : and let the human
pick the appropriate one, I think that might be
good enough?

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to