Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Syntax families

Name: Anonymous 2012-01-15 13:48

How many syntax families are there /prog/?
Lisp: All the lisps, homoiconic and syntax takes 2 seconds to learn, parsing is LL(0) easy.
Pascal: A bunch of languages, some can apparently compile in a single pass.
C: C and perhaps some other ones. C requires a symbol table to disambiguate, parsing by `maximal munch'.
Curlies: The only thing in common with C is they both have curlies and both are imperative, the scripting languages often don't require the symbol table.
Prolog: Prolog and Erlang, homoiconic but a bitch to write in, parsing is ``easy'' as its just a long string of weighted operators (maybe APL is loosely related).
strtok'ers: Forth and the rest of these. `Parser' can be strtok.
Full Retard: C++

Name: Anonymous 2012-01-15 13:50

4/10

Name: Anonymous 2012-01-15 13:58

Parsing you're mother is LL(0) easy!

Name: Anonymous 2012-01-15 14:06

strtok'ers
+1

Name: Anonymous 2012-01-15 14:10

Forth can be parsed by a regular expression.

Name: Anonymous 2012-01-15 14:16

Regular, context-free, context-sensitive, unrestricted.

Name: Anonymous 2012-01-15 14:49

C++ is in the C syntax family. You would be a full retard to separate it from it. Java and C# are more of a subset of the C syntax family, it's just that they're shit

Name: Anonymous 2012-01-15 15:06

>>7
No. The C++ grammar is undecidable. (Incidentally perl, which can only be parsed by running the program should be in the full retard category too)

Name: Anonymous 2012-01-15 15:35

>>8
Are you fucking this dense buddy? Just curious because a while back someone posted a link to a paper that showed Perl 5 was unparsable.

Name: Anonymous 2012-01-15 15:44

>>9
He's fucking which dense buddy?

Name: Anonymous 2012-01-15 15:50

>>10
>>8 is a stupid shit who has no possible future as a computer programmer.

Name: Anonymous 2012-01-15 18:18

>>8

do you mean that parsing it is undecidable? I've heard that perl can modify its own grammar, so I guess it would need to be parsed as it ran. So if a perl program never halted, then you technically would not be able to parse it in general. I don't see how you can say the same thing about seeples though. It is a complicated mess sure, but the complicated mess has its limits in how complicated it is.

Name: Anonymous 2012-01-15 19:07

Here are some more:
Line number languages: all control flow involves line numbers (e.g. original BASIC, FORTRAN, COBOL)
"English-like" languages: each statement is made up of English-like keywords and all statements have their own syntax and sub-keywords (e.g. COBOL, SQL, AppleScript)
FIOC languages: leading white space is syntactically significant (e.g. Python, Fortran 77)
Self-modifying syntax: macros can be defined to alter the parsing grammar of the language (e.g. Perl 6)

Name: Anonymous 2012-01-15 19:36

You forgot one...
Image-based languages: The program is in the form of an image (e.g. Piet)

Name: Anonymous 2012-01-15 19:41

>>13
Self-modifying syntax: macros can be defined to alter the parsing grammar of the language (e.g. Perl 6)
And Forth, I don't know about the other stack languages.

Also, ML-style languages (ML, Haskell, ...).

Name: Anonymous 2012-01-15 21:35

>>15

The stack based languages that I've seen support storing code in an array, modification to the array, and then execution of the array of code. I've used that to implement macros in postscript before. No one uses postscript anymore ;_; I'll have to make C bindings for networking with it. ( =_=)

Name: Anonymous 2012-01-15 21:46

>>16
Uhhhh... So in others you realized that any operation that only uses two stacks is a universal turing machine?

Name: Anonymous 2012-01-15 21:54

>>13
You can modify the grammar on Perl 6 *directly*.

Don't change these.
Name: Email:
Entire Thread Thread List