[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Parser
On 02-Sep-2000 vilohidi@mbnet.fi wrote:
> I'm planning to make a text adventure, but I don't want to make a parser.
> Do you know where I could get a good parser?
> The game will have a realistic weapon system, rpg integers that are not
> shown to player (so he has to find them himself!).
>
> PS. Can you tell me some nice 2 player on same computer games?
>
> --
> Wille <vilohidi@mbnet.fi>
>
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
:)
-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