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

  • Home
  • SEARCH
  • 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 8981421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T20:19:54+00:00 2026-06-15T20:19:54+00:00

I am asking for gplex , however it might be the case, the solution

  • 0

I am asking for gplex, however it might be the case, the solution to the problem works for other lex-derived tools.

I wrote all rules, everything is fine with one exception. The type of the scan method of the generated scanner is int, and I would like to be MySymbol (which would consist of id of the token — INT, STR, PLUS, so on, its value, and possible location in the file).

I checked the samples (not many of them), but they are very simplistic and just write out the fact rule was matched, I’ve read the manual, but it starts from parser perspective and for now I am a bit lost.

One of my rules in lex file:

while { return new MySymbol(MyTokens.WHILE); }

All I have now is scanning phase, I have to finish it, and then I will think about parser.

  • 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-15T20:19:55+00:00Added an answer on June 15, 2026 at 8:19 pm

    Yacc and Yacc-like tools (here GPLex) relies on side effect. Normally you could think of returning the data, but here you are returning token id, and any extra data has to be “passed” via special variables like yyval.

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

Sidebar

Related Questions

Re-asking because my other thread wasn't clear and I didn't understand the true problem.
Before asking a question, and before you all get mad because there are a
Im asking to see if anyone could help me with my problem which is
Before asking this question I have Googled for this problem and I have looked
After asking my last question I thought the problem was solved, and the answer
After asking this question Htaccess URLRewrite to another map That works great, but now
I might be asking a dumb question, but I am trying to understand the
Im asking because Im trying to debug a SQL query problem and adb only
I'm not asking for all the answers just if someone can help guide me
I asking about this case(replace item by position : highest with lowest etc.. ):

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.