Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  nodelist  faq  login

You can't go home again, unless you set $HOME.


programming / comp.compilers / latest

Seed7 Release 2022-05-22

comp.compilers

Posted: 1 Day 2 Hours ago by: Thomas Mertes

I have released a new version of Seed7: seed7_05_20220522.tgz The download is here: https://sourceforge.net/projects/seed7/files Seed7 is also at GitHub: https://github.com/ThomasMertes/seed7 The Seed7 programming language has many interes

RE: Who first invented dotted-item notation? (thread)

comp.compilers

Posted: 1 Day 4 Hours ago by: Christopher F Clark

Yes, exactly. It gives a kind of "operational semantics" to BNF/Regexes. "I am here. This is what I expect to see next. Or this, or this." The way many kids learn to write stories with "This happened. And then this. And then this.

Re: Who first invented dotted-item notation? (thread)

comp.compilers

Posted: 1 Day 11 Hours ago by: gah4

This could be asked in general, for the origin of different notations used in programming languages and their documentation. The first use of dot that I know of, similar to an operator, is for structure reference qualifiers in PL/I, and

RE: Who first invented dotted-item notation? (thread)

comp.compilers

Posted: 2 Days 2 Hours ago by: Christopher F Clark

Let me explain a little further. Dotted-items are useful in translating (and visualizing) state machines as translations of regular expressions or grammar rules. In Glushkov's construction one takes a regular expression /ab*(cb)+a/ and m

Re: Who first invented dotted-item notation? (thread)

comp.compilers

Posted: 2 Days 18 Hours ago by: Kaz Kylheku

In Lisp, we can write (1 2 3 4 5 6) in any of these ways: (1 . (2 3 4 5 6)) (1 2 . (3 4.5 6)) (1 2 3 . (4 5 6)) (1 2 3 4 . (5 6)) (1 2 3 4 5 . (6)) (1 2 3 4 5 6 . NIL) As well as: (1 . (2 . (3 4 5 6))) The dot doesn't actually exist;

Who first invented dotted-item notation?

comp.compilers

Posted: 3 Days 3 Hours ago by: Christopher F Clark

I know the notation from LR(0) machine construction, but also know that Gluskhov used it in his solution to NFA construction. Earley also used the notation to describe his method if I understand right. I'm presuming that there is some firs

Table driven LL.

comp.compilers

Posted: 3 Days 3 Hours ago by: Christopher F Clark

George Neuner speculated that table driven LL parsing is possible, and I will answer yes. When I was in college taking my compilers course (circa 1976) our teacher (Dr Burton J Smith who later ran Cray) had us implement a table driven LL p

Re: Please provide a learning path for mastering lexical analysis languages (thread)

comp.compilers

Posted: 3 Days 4 Hours ago by: Christopher F Clark

My apologies for this delayed reply. The startup I am working for is nearing the alpha release and I had things on my plate that I needed to give priority. Let me start my answer with two simple rules of thumb, in order of importance. 1)

Re: Fortran to C/C++ translation: a running example. (thread)

comp.compilers

Posted: 3 Days 19 Hours ago by: Thomas Koenig

Fortran has the concept of storage association - under certain circumstances, the ordering of variables is prescribed by the standard. COMMON blocks are one example of this. Taking an example from the original Fortran source code: COM

Re: Fortran to C/C++ translation: a running example. (thread)

comp.compilers

Posted: 3 Days 20 Hours ago by: gah4

(snip on COMMON and EQUIVALENCE) COMMON and EQUIVALENCE are closely related in the Fortran standard, and in the implementation by compilers. A variable equivalenced to a variable in common, is also in common. Such variable can extend

The "philosophy" of why labeled trees aid in the translation process

comp.compilers

Posted: 3 Days 22 Hours ago by: Roger L Costello

Hi Folks, A book [1] that I am reading says this: ------------------------------- It is often convenient in specifying and implementing translations to treat a translation as the composition of two simpler mappings. The first of these re

Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.

comp.compilers

Posted: 4 Days 13 Hours ago by: Lydia Marie Williams

I can interleave your in-between states into my GitHub sequence as a parallel side-branch, if you wish. That will significantly help close out another loose end that I hadn't yet fully resolved. I reverted back from character-based to a

Re: Fortran to C/C++ translation: a running example. (thread)

comp.compilers

Posted: 4 Days 13 Hours ago by: Lydia Marie Williams

This is not exactly correct. It's "common blocks" that were handled in this way. In the Fortran source of Zork/dungeon, the "equivalence" statements and "common blocks" were used together, so it's easy to get the issue confused. I don't

Ann: HAC v.0.1 Ada compiler

comp.compilers

Posted: 6 Days 3 Hours ago by: Gautier write-only a

HAC (HAC Ada Compiler) is a quick, small, open-source Ada compiler, covering a subset of the Ada language. HAC is itself fully programmed in Ada. Web site: http://hacadacompiler.sf.net/ From there, you find links to sources and an executa

Re: Fortran to C/C++ translation: a running example. (thread)

comp.compilers

Posted: 7 Days 22 Hours ago by: Thomas Koenig

[...] Nit: In Fortran, "parameters" are what you would call "constants" in another language. Arguments to functions or subroutines are called "dummy arguments", which are then associated with "actual arguments" on the caller's side. "

Re: [Rock Brentwood] Fortran to C/C++ translation: a running example.

comp.compilers

Posted: 8 Days 14 Hours ago by: Ian Lance Taylor

Just FYI I was the enterprising soul who translated the code from Fortran to C. I still have at least some of the intermediate files. Happy to answer any questions. That said, most of the work was manually rewriting the f2c output into

Ada-Europe - AEiC 2022 early registration deadline approaching (Belgium, June 2022)

comp.compilers

Posted: 8 Days 17 Hours ago by: Dirk Craeynest

----------------------------------------------------------------------- UPDATED Call for Participation *** Early registration DEADLINE May 20 *** 26th Ada-Europe International Conference

Fortran to C/C++ translation: a running example.

comp.compilers

Posted: 8 Days 17 Hours ago by: Rock Brentwood

The classic text-based computer game Zork / dungeon was originally devised on MIT computers in a LISP-offshoot (MDL), and translated to Fortran 77 by an "Anonymous" author. Some time later an enterprising soul converted a version of the Fo

Re: Please provide a learning path for mastering lexical analysis languages (thread)

comp.compilers

Posted: 11 Days 16 Hours ago by: gah4

There is a story that there is someone at Microsoft whose only job is the "START" button in the corner. Does a large compiler company, or compiler group of a large company, have one person specializing in lexical analysis? I would have

Re: Please provide a learning path for mastering lexical analysis languages (thread)

comp.compilers

Posted: 16 Days 7 Hours ago by: Paul B Mann

/* Token Rules */ <constant> -> literal -> integer -> decimal -> real <identifier> -> letter (letter|digit)* integer -> digit+ real -> integer exp -> decimal exp decimal -

Re: Please provide a learning path for mastering lexical analysis languages (thread)

comp.compilers

Posted: 16 Days 12 Hours ago by: luser droog

I'd like to echo George Neuner's remark: In my opinion the best way to truly "master"* such tools is to step away from the tools per se and delve into the algorithms and data structures involved. The best book for this (again, in my opi

Re: Please provide a learning path for mastering lexical analysis languages (thread)

comp.compilers

Posted: 16 Days 20 Hours ago by: George Neuner

It's not the grammars (languages) used by the tools that you need to learn - it's the methods used the tools that are important. Lexical analysis is not terribly interesting ... it really just is about tokenizing the input. There are

Simple Lexer and Simple Parser [ was RE: Flex is the most powerful lexical analysis language in the world. True or False? ] (thread)

comp.compilers

Posted: 16 Days 23 Hours ago by: Roger L Costello

Thank you again Chris. Terrific information. Another question if I may. You wrote: For a while now I have been (for fun) working on building a parser for parsing XML documents. I have experimented with making the lexer simple and with m

Re: fun with Postscript, was Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 17 Days 17 Hours ago by: gah4

(snip, I wrote) (snip) Reminds me of the origin of RISC, when (I believe) IBM noticed that compilers were using a small subset of the available instructions, and that much less programming was being done in assembly. But okay, was Post

RE: Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 18 Days 3 Hours ago by: Christopher F Clark

Roger, since you asked, I will answer what solution I would reach for (and give advice on what I think others should reach for). First, John's advice is straight on. You don't need a flamethrower in most cases, and in fact having one invi

Announcing Ox release 1.10.2

comp.compilers

Posted: 18 Days 11 Hours ago by: Tom Shields

Ox version 1.10.2 is now available on SourceForge (sourceforge.net/projects/ox-attribute-grammar-compiler/). Ox generalizes the function of Yacc in the way that an attribute grammar generalizes a context-free grammar. Ordinary Yacc and L

Re: Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 18 Days 15 Hours ago by: gah4

(snip) An important part of a programming language is that people can understand it. I suspect it isn't hard to design a language that computers can easily parse, but people can't. Your lexer only needs to be good enough for actual pr

Re: Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 18 Days 22 Hours ago by: George Neuner

+1 John. Roger, if you hadn't already asked some more interesting questions, I would suspect this 'test' was homework. Flex is powerful, but it certainly is not alone. As John's response hinted, there are (plenty of other) tools that

Please provide a learning path for mastering lexical analysis languages

comp.compilers

Posted: 19 Days 1 Hour ago by: Roger L Costello

Hi Folks, I want to master lexical analysis. In Chris Christopher's last post he said: I am currently in the process of mastering Flex. I feel that mastering Flex will give me a foundation for learning other more advanced lexical analy

RE: Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 19 Days 2 Hours ago by: Roger L Costello

Thank you Chris for that superb explanation! May I ask, what would be the solution that you would reach for first? /Roger [I'm not Chris but the answer is the one that does the job. You don't need a flame thrower if you only need to lig

Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 20 Days ago by: Christopher F Clark

First, of all, I think Flex is a relatively fine lexer generator with some good properties and reasons why it is popular, but claiming it is "the most powerful lexical analysis language in the world" is way too far overstating it. It is no

Re: Flex is the most powerful lexical analysis language in the world. True or False? (thread)

comp.compilers

Posted: 20 Days 18 Hours ago by: Tom Shields

FYI: RE/flex [https://github.com/Genivia/RE-flex] provides a superset of flex functionality, generates a better implementation of a scanner in C++ than does flex, and, most importantly, is actively maintained. Tom Shields

Flex is the most powerful lexical analysis language in the world. True or False?

comp.compilers

Posted: 21 Days 1 Hour ago by: Roger L Costello

Hi Folks, 1. A lexical analysis language that exclusively provides regular expressions for scanning input can only process regular languages. (a) True (b) False 2. Flex provides, in addition to regular expressions, states and a pushdown

Ada-Europe Int.Conf. Reliable Software Technologies, AEiC 2022 (Belgium, June 2022)

comp.compilers

Posted: 21 Days 17 Hours ago by: Dirk Craeynest

----------------------------------------------------------------------- Call for Participation *** PROGRAM SUMMARY *** 26th Ada-Europe International Conference on

Re: Using a C struct to represent a node in a parse tree ... how many fields in the struct? (thread)

comp.compilers

Posted: 27 Days 8 Hours ago by: luser droog

This is mostly how I do it. I've just started a new draft in C, so it's the appropriate size (and scope) to share as an example. One trick I've found useful in previous versions is the extra 'data' member in the symbol struct. If the outp

Re: Programming language similarity (thread)

comp.compilers

Posted: 29 Days 13 Hours ago by: Derek Jones

gah4, More than you probably wanted to know about character set history still being with us https://archive.org/details/mackenzie-coded-char-sets

Re: Question about regex with negated character class (thread)

comp.compilers

Posted: 29 Days 13 Hours ago by: Kaz Kylheku

I suspect this is a documentation mistake (in terms of the the remark it makes about other regex implementations). There is something special in Flex with regard to newlines: namely the any-character regular expression . (dot) does not m

Re: Programming language similarity (thread)

comp.compilers

Posted: 29 Days 15 Hours ago by: gah4

(snip) Early Fortran was limited by the number of characters available on the IBM 026 keypunch. They redefined some of the punch codes with different symbols for scientific use, as that was easier than designing a whole new machine. M

Re: Programming language similarity (thread)

comp.compilers

Posted: 29 Days 17 Hours ago by: Derek Jones

Jan, This is an interesting collection of decisions made by authors over 120 years. What makes somebody choose a particular set of symbols. My guess is that their past experience is a major factor, i.e., the use of symbols they had previ

Re: Programming language similarity (thread)

comp.compilers

Posted: 29 Days 18 Hours ago by: Derek Jones

Fernando, Please do. The code is under a GPL license. I was surprised by the diversity of words used. I looked into building a tree based on allowed implicit types, with the hope of coming up with a measure of strong/week typing. A

Re: Programming language similarity (thread)

comp.compilers

Posted: 29 Days 21 Hours ago by: Meshach Mitchell

I could see how that could be interesting as an academic pursuit, but I think the dearth of exploration here is most likely because pretty much anyone in a position to do that already knows that every turing complete language is equivalent.

41 recent articles found.

rocksolid light 0.7.2
clearneti2ptor