Online documentation and examples output are now available for our products
The only function of economic forecasting is to make astrology look respectable.
— John Kenneth Galbraith
Posted on 2017-Mar-27 at 12:53:54 by Phil
Last update on 2019-Jul-28 at 17:15:09 by Phil
Not many of us will have call to write an entire language’s compiler from scratch, but most of us have been called upon to process configuration files, etc., written in a somewhat “high level” language. Such languages should be clean and understandable to humans, so something as cluttered and rigidly machine-oriented as XML is undesirable. This board is oriented towards discussion of methodologies for constructing such translators, interpreters, and compilers. Ad hoc freehand design of such a system is often not a good thing — you really should have some method behind your madness, or your code is likely to be very brittle, difficult to extend or reuse, and generally buggy.
The intent is to discuss a range of language translators, whether you’re building utilities to translate old COBOL code to C# (good luck!), read (and possibly write) configuration files, an interpreter for some purpose, or an out-and-out compiler. It can be a standalone program or a module to drop into other code (and thus, the language choice is constrained for you). It can be a full translator to low level machine language (assembly code), a Just-In-Time bytecode compiler, or something else. Whatever you need, whether needed for your work, or just for expanding your skill set.
Some resources to get us started (please suggest more!):
Please try to keep any algorithms you give in a more or less language-independent style, unless the subject matter is for a specific implementation language. You may love writing in Python, but you want your work to be accessible to someone who doesn’t know Python.
Finally, discussion is open for implementing not only “traditional” languages that you find compilers and interpreters for, like C or FORTRAN (with expressions inside control structures), but also “inside-out” languages such as HTML, where keywords and other control structures are often embedded inside running text content. There are still rules that apply (especially for tag nesting), but the structure is often more one of a lot of disconnected little pieces. See Javascript Document Object Model.
Posted on 2022-Dec-14 at 13:09:00 by Phil
Another interesting attempt at a compiler toolkit is LLVM. I haven’t had a deep dive into it yet, but it appears to be worth keeping in mind.
Posted on 2023-Jan-20 at 10:18:00 by Phil
An interesting article on natural language processing re-inventing a re-invention of computer science in Physics.org. It concerns an ancient Sanskrit technique for word formation that was just rediscovered by scholar. I commented that it sure sounds like a compiler shift-reduce conflict, with a similar rule (take the shift) to resolve it.
All content © copyright 2005 – 2023
by Catskill Technology Services, LLC.
All rights reserved.
Note that Third Party software (whether Open Source or proprietary) on this
site remains under the copyright and license of its owners.
Catskill Technology Services, LLC does not claim copyright over such software.
This page is https://www.catskilltech.com/general-guidelines-and-resources.html
Search Quotations database.
Last updated Fri, 04 Aug 2023 at 11:32 AM