Liste des Groupes | Revenir à cl c |
On 04.12.2024 18:43, Bart wrote:You really hate toy languages don't you?Is that the reason why there's so many versions around that are[...]>
Do you use a formal grammar when parsing a CSV file, or something
equally trivial?
incompatible? CSV-parsing is not "trivial" if you look into the
details; you have to specify these (at first glance not obvious
details) to be sure that your "CSV-data" works not only with your
"CSV-parser" but that there's a common understanding of the CSV-
"language". (It's only few details; delimiters in string values,
escapes, and such, but enough to initiate incompatible formats.)
Yes, of course; if there would have been a formal specification
in the first place we wouldn't have the mess we now actually have.
And if you anyway write your tools only for yourself, and if you
don't intend to exchange data with others, no one cares what you
think a/the "CSV-format" actually is.
But we weren't discussing such comparably simple structures; we
have been discussing programming languages (and their grammars).
And most of us are considering sensible languages, not privately
hacked up toy languages or implementations of personal hobbies.
Human languages (specifically English with its many irregularities)PE file is described in English. Most file binary file formats are.
are worse than a formal language and a unreliable base and unsuited
as programming languages.
That's nothing more then a hacker's feeble excuse to justify hisSo you're calling me a hacker, and you're calling me ignorant.
ignorance.
When YOU devise a language, then YOU can choose to do it whichever way YOU like. I wouldn't care one way or another.>Like, as I've heard, the Unix shell, with all it's irregularities
Or the parser was created for a trivial language and has evolved.
and quirks? - You really think this is a good paragon?
Even if some hacker defines a language ad hoc - and Intercal comes
to my mind - for a serious programming language you should have
[documented] syntax and semantics, and why the hell would anyone
use English instead of a formal specification for syntax.
Again. I bet the first C compiler didn't bother with a grammar!A formal or informal grammar might be useful in a language reference -For a hacker like you maybe. Professionals typically specify before
once the language is stable.
implementation.
By contrast, the languages that you've devised are in common use of course?[...]Is that the reason why your languages and compilers are so widespread
>
For the rest of us, that part is the simplest part of a compiler. You
write it, and move on.
used? </sarcasm>
Les messages affichés proviennent d'usenet.