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 8976765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:13:10+00:00 2026-06-15T19:13:10+00:00

I am currently looking at implementing the language shown here in Java. The presentation

  • 0

I am currently looking at implementing the language shown here in Java. The presentation is a little long, but it is essentially a DSL for creating dynamic speech.
Example:

rule ExampleRule
{
    criteria Criterion1 Criterion2 Criterion3=value
    response ExampleResponse
    remember State:=1
    trigger Object TriggerName
    ApplyFacts "State1:1:0,State2:1:0"
}
response ExampleResponse
{
    say "Text" then object ExampleRule
    say "Text" then any ExampleRule
    say "Text"
    scene "Scenepath"
}

I have looked at the different parser generators such as ANTLR, JavaCC and JFlex, but am wondering whether to just use StringTokenizer/Scanner and roll my own parser, as it is for a hobby project.

I had earlier decided on ANTLR but ran into some issues with ANTLR using full pathnames in the generated source code, and the runtime library seemed a bit heavyweight. I have not been able to find much information comparing the three parser libraries or the inbuilt Java alternatives.

What are the advantages/disadvantages of each parser given the nature of the language?

  • 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-15T19:13:12+00:00Added an answer on June 15, 2026 at 7:13 pm

    The advantages of using parser generators:

    1. Correctness by construction. The generated parser accepts exactly the language specified in the grammar, and there are all kinds of CS proofs of that for the various kinds of generators, starting with Knuth 1965. If you roll your own, e.g. recursive descent, you have no immediate proof of that, and no easy way to test it.

    2. Development time. Once you get your head around the generator’s foibles, the parser is built about as fast as you can type.

    ‘Given the nature of the language’ isn’t all that relevant. Major practitioners made major mistakes in implementing nothing more complex than arithmetic expressions in the 1960s, which is why my point (1) is my point (1).

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

Sidebar

Related Questions

Hey, I'm currently looking for various methods of implementing collision response in 2D video
I am currently implementing a simulation in Java that requires an input of about
I'm implementing a LINQ clone in Lua, but that's not too relevant here, and
We're currently looking at implementing Facebooks new subscription payments . We already have a
I am currently looking into implementing a client which will use an existing extensive
I am currently working on implementing a Unix shell. I am looking to use
I am currently developing a dynamic LineChart in FLEX 4. I am implementing a
I've been looking at the DropBox Mac client and I'm currently researching implementing a
Currently looking into learn new technology and silverlight is on the potential list. However,
I am currently looking to deploy a web forum on the azure platform. I

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.