[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Parser




On 03-Sep-2000 vilohidi@mbnet.fi wrote:
> On Sat, 2 Sep 2000, Erik wrote:
> 
>> lex/yacc (flex/bison) make it incredibly easy to make simple parsers. lex
>> (short for lexical analyzer) tokenizes the string and passes the information
>> back to yacc (yet another compiler compiler), which then applies grammar
>> rules.
>> It's used a lot in writing compilers and interpreters, but can easily be
>> worked
>> into a game... there is an article in the linux section of ibm's developer
>> works, part of the "pirates ho" series, I THINK number 4, that talks about
>> using lex and yacc as a video game scripting language... An input parser
>> would
>> basically be a scripting interface that does immediate actions on single
>> lines
>> :)
> 
> Can you give me any adresses?
> 
> --
> Wille <vilohidi@mbnet.fi>
> 

http://www.gnu.org/software for flex and bison (they also have excellent 'info'
pages, type 'info flex' or 'info bison'), specifically:

        http://www.gnu.org/software/bison/bison.html
        http://www.gnu.org/manual/bison/index.html
        http://www.gnu.org/software/flex/flex.html
        http://www.gnu.org/manual/flex-2.5.4/flex.html


http://www-4.ibm.com/software/developer/library/pirates4/index.html?dwzone=linux
is the article for pirates ho, it talks about using lex/yacc to make a
scripting language engine.

there are lots of university type resources available on the web, and several
books that talk about using them. Basically any documentation on making
compilers or interpreters will be useful... (the first part of compiling is to
check the syntax and build a data structure to represent the semantics in a
machine friendly way... parse trees and stuff) 

I personally found the info pages to be incredibly useful, and would use those
to start off with. :)


        -Erik <erik@smluc.org> [http://math.smsu.edu/~br0ke]

The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
Refrigerated.
        

---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk