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

Pages: 1-

Language Processing

Name: Anonymous 2011-06-05 12:05

So I am writing a Java program that needs some language parsing. This language parsing is meant to be extended and modified in the near future. The thing is, i already know how to flex/bison this shit, but I think that flex and bison are shit, so I don't want to use them. Alternatives?

tl/dr: flex and bison are shit, what can i use instead?

Name: Anonymous 2011-06-05 12:28

NO EXCEPTIONS

Name: Anonymous 2011-06-05 12:29

Name: Anonymous 2011-06-05 12:29

wtf, 30 minutes and the only response is the no exceptions meme.
/prog/ i am dissapoint

Name: Anonymous 2011-06-05 12:31

use python

Name: Anonymous 2011-06-05 12:33

>>1,4
i
This is why. Also, you don't give enough context: depending on what you're doing, even an hand-coded RDP may be enough.

Name: Anonymous 2011-06-05 12:34

>>6
stop being autistic. if you understood what he meant it doesnt matter how he presented it.

Name: Anonymous 2011-06-05 12:36

>>6
It's an input system for an experimental logic framework. I need it for getting the conditions of reasoning for the system, and hand-coded is not an option for my boss because it is not ENTERPRISE enough.

Name: Anonymous 2011-06-05 12:37

>>7
On /prog/ it means alot. Go fuck an autistic number.

Name: Anonymous 2011-06-05 12:43

>>9
autism is no virtue

Name: Anonymous 2011-06-05 12:46

>>7
What kind of language is he going to parse? Natural language? A DSL? A programming language? Is its grammar context-free? Is the grammar left recursive? Is the grammar ambiguous? Not enough context.

Name: Anonymous 2011-06-05 12:52

>>8
Well, if you can't hand-code it, and you must do it in Java, the only lexer/parser generators that output Java code that I know are JFlex, JLex and bison.

Name: Anonymous 2011-06-05 13:13

>>11
It is going to be a context-free grammar. And obviously, if I can make it on bison, the grammar is not left-recursive and not ambiguous.

Name: Anonymous 2011-06-05 13:35

>>13
Pratt parsers seem to be exactly what you want, but there are no pratt parser generators, you'd have to hand-code it (not difficult at all)
Basically, it's an RDP that can gracefully handle operators and precedence.

See:
http://javascript.crockford.com/tdop/tdop.html
http://journal.stuffwithstuff.com/2011/03/19/pratt-parsers-expression-parsing-made-easy/

Name: Anonymous 2011-06-05 14:06

>>14
That seems interesting and ENTERPRISE at the same time.
I'm confus.

Name: Anonymous 2011-06-05 14:21

>>14

I’ll be coding in Java, the vulgar Latin of programming languages.

Name: Anonymous 2011-06-05 14:45

>>16
Yeah, Latin sucks and is overly verbose?

Name: Anonymous 2011-06-05 15:56

Java's more like Portuguese to C's Spanish.

I figure if you can write it in Java, you can write it in anything.
What the fuck?

Name: Anonymous 2011-06-06 11:31

Name: Anonymous 2011-06-06 17:44


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