Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9202987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:22:42+00:00 2026-06-17T23:22:42+00:00

One of the first things that got me into wanting to program was to

  • 0

One of the first things that got me into wanting to program was to create a multiplayer text game. I was scared away from the notion though when I realized, at least at the time for me, how complicated writing a smart parser would be.

So now I’m back to thinking about it, and I’ve tried to do lots of research on the subject. It turns out that it seems to be a lot more involved than I think, and I’ve stumbled across terms such as lexing and tokenizing and parsing, only the latter of which I knew of before. I figured the field of lexical analysis is what I wanted to look for.

So instead of trying to create my own lexer and parser which I’ve read to be very difficult and error prone, and most people instruct to steer away from, I thought I would find a good lexer and parser generator to use which will supposedly do all the heavy lifting for me and I can just focus on the grammar that I want. I’ve also heard lots of people say that individuals looking to do such a thing should simply use Inform.

Sure, I guess Inform is cool, but C# is my language of choice and I like the freedom that it allows me over what I perceive Inform to offer. I’m more interested in creating all the components and framework of the multiplayer text game than I am in any one particular final result, and so I like the idea of using a standard programming language best.

I’ve been trying to find a good lexer/parser generator for C# for a while now, not really satisfied with all that seems to be offered in terms of the comments people give.

antlr for C# seems to be underdeveloped and mostly an afterthought.
I’ve tried understanding GPLEX and GPPG but as of right now they are far too confusing for me, despite reading a lot of the documentation and trying to read up a lot on lexing in general.

I have a lot of the concepts in my head about the whole process of lexing, but when faced with a lexer and a parser, I guess I don’t really know how these are supposed to be meshed into my actual code.

I want to build a simple English like grammar with noun phrases and verb phrases, and be able to have lists of nouns and verbs that can be dynamically added and ready from a database as the game is developed and expanded upon.

I guess I’m feeling like I’m turning up short on the results of the research I’ve been trying to do with this subject.

To be honest, the idea of creating my own bastardized notion of a lexer and parser based on what I’ve researched seems far more appealing at this point than using any lexer/parser generator that I’ve read about.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:22:44+00:00Added an answer on June 17, 2026 at 11:22 pm

    First, some meta-advice. This is maybe not a great question for StackOverflow since it is not about a specific technical problem. You might consider asking questions like this on Programmers.StackExchange.com instead.

    To address your question: I agree with tallseth; it depends on what skill you want to improve here. People occasionally ask me why I don’t build a boat, since I am fairly handy and like sailing. Because you should only build a boat if you like having an unfinished boat in your garage for two years. If you want to sail, sail. If you want to build a boat, build a boat. But don’t build a boat because you want to sail. If you want to write a text adventure, learn Inform7; it is the most incredibly awesome tool for making text adventures the world has ever seen. If you want to learn how to make a lexer and parser, then don’t mess around with parser generators. Make a lexer and parser.

    Parser generators are great if you are prototyping up a new programming language and you want to get going quickly. But programming language grammars can have really nice properties that make them amenable to automatic parser generation in a way that natural languages do not. You’re likely to spend as much time fighting with the parser generator as you spend building the grammar if you go with a parser generator approach.

    Since you’re a beginner at this, I suggest that you recapitulate the history of text adventures. Start by writing a lexer and parser that can parse two-word commands: “go north”, “get sword”, “drop brick”, and so on. That will give you enough flexibility that you can then start solving other problems in text adventure design: how to represent objects and locations. Start small; if you can make a two-room game where the player can pick up and put down objects, you are well on your way.

    In short, I strongly encourage you to follow your instinct; writing your own lexer and parser is super fun and actually not that hard if you start small and work your way up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First one: how can I create a Thread that doesn't start right away.If I
One of the first things I learned in C++ was that #include <iostream> int
Is that real to pull only one (first or last, no matter) photo from
One of the first things I like to do when I make a site
One if the first things I learned when I started with C# was the
I know the bits just came out today, but one of the first things
First of all I want to mention two things, One: My code isn't perfect
I've got an interactive command line program that we'll call program.exe. While it's running,
My team is on its way to create our first game for Android and
When I first got into databases I was using SQL Server. I got into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.