which depends on whether 'nonsense.no' is registered with IANA to
correspond to an allocated IP address. If it is registered, then I can
agree that this is syntactically valid. If is not registered, one can
argue that it is not even "syntactically valid", because valid domain
names are determined by IANA registry, not by a production rule. That
is, the requirement is not just that it is well-formed, but rather that
it is in a particular list of valid strings. By way of analogy,
consider a language in which symbols must be declared before they are
used. If the parser encounters a well-formed lexical object that should
be a declared symbol but the "symbol table lookup" fails (the symbol was
never declared), is that a "syntax error"? Is that text "syntactically
valid"? (I don't know that the formal languages community has
consistent terminology in this area, but I haven't written a compiler in
over 20 years. Maybe they do now.)
We may be splitting hairs here.
symbols. You may define the language ostensibly, by listing all the
strings, which would imply which symbols are in the alphabet. You may
and rules for forming strings in the language. You may do both, but the
definitions must agree.