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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T02:05:53+00:00 2026-05-11T02:05:53+00:00

I have a lexer built that streams out tokens from in input but I’m

  • 0

I have a lexer built that streams out tokens from in input but I’m not sure how to build the next step in the process – the parse tree. Does anybody have any good resources or examples on how to accomplish this?

  • 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. 2026-05-11T02:05:53+00:00Added an answer on May 11, 2026 at 2:05 am

    I would really recommend http://www.antlr.org/ and of course the classic Dragon Compilers book.

    For an easy language like JavaScript it’s not hard to hand roll a recursive descent parser, but it’s almost always easier to use a tool like yacc or antlr.

    I think to step back to the basics of your question, you really want to study up on BNF-esque grammar syntax and pick a syntax for your target. If you have that, the parse tree should sort of fall out, being the ‘instance’ manifestation of that grammar.

    Also, don’t try to turn the creation of your parse tree into your final solution (like generating code, or what-not). It might seem do-able and more effecient; but invariably there will come a time when you’ll really wish you had that parse tree ‘as is’ laying around.

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

Sidebar

Related Questions

I have successfully built a parser/lexer that creates an AST for my language. Yeah!!
I have a program that creates a C# class from a text file. The
I have lexer/parser (Generated from an ANTLR grammar file) which (for performance reasons) I
I have already written a lexer which returns tokens, and now I'm working on
I have defined different states in my lexer, which change not depending on the
Let's suppose I have two grammars (and that there is a Lexer defined somewhere),
I am working on a transliteration tool. I have two modules lexer and translator.
I am using one .g file for both lexer and parser. I have the
Has anyone of you successfully added a lexer to scintilla? I have been following
I’m trying to build a grammar that interprets user-entered text, search-engine style. It will

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.