Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] provide state stack, like in flex [sf#20] #155

Open
lsf37 opened this issue Feb 15, 2015 · 7 comments
Open

[Feature] provide state stack, like in flex [sf#20] #155

lsf37 opened this issue Feb 15, 2015 · 7 comments
Labels
enhancement Feature requests help wanted Good first issues
Projects

Comments

@lsf37
Copy link
Member

lsf37 commented Feb 15, 2015

Reported by jafl on 2007-07-28 00:00 UTC
flex provides yy_push_state(int new_state) and yy_pop_state() and yy_top_state().

These are very useful when one wishes to reuse a state from several other states. The re-used state calls yy_pop_state() instead of BEGIN().

@lsf37 lsf37 changed the title provide state stack, like in flex [Feature] provide state stack, like in flex [sf#20] Feb 15, 2015
@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2007-07-29 00:52 UTC
Logged In: YES
user_id=93534
Originator: NO

Hi John,

these two should already be supported if you use the file skeleton.nested as skeleton file for the spec (see also the command line options or the build options of jflex itself).

Cheers,
Gerwin

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by jafl on 2007-07-30 19:49 UTC
Logged In: YES
user_id=1439262
Originator: YES

Actually, skeleton.nested provides a stream stack, not a state stack. I will work on implementing a similar skeleton for states, and send it to you.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by jafl on 2007-07-30 20:28 UTC
Skeleton file with state stack functionality

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by jafl on 2007-07-30 20:28 UTC
Logged In: YES
user_id=1439262
Originator: YES

I have the state stack working.
File Added: skeleton.state_stack

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by lsf37 on 2007-08-01 22:30 UTC
Logged In: YES
user_id=93534
Originator: NO

Thanks, you're right, of course.

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Updated by lsf37 on 2007-08-01 22:30 UTC

  • priority: 5 --> 3

@lsf37
Copy link
Member Author

lsf37 commented Feb 15, 2015

Commented by jafl on 2007-08-03 22:48 UTC
Logged In: YES
user_id=1439262
Originator: YES

My suggestion would be to include the state stack in the default skeleton. The patch is very minor and very useful :)

@lsf37 lsf37 added the enhancement Feature requests label Feb 15, 2015
@regisd regisd added this to Open feature requests in JFlex core Sep 10, 2018
@regisd regisd added the help wanted Good first issues label Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests help wanted Good first issues
Projects
JFlex core
  
Open feature requests
Development

No branches or pull requests

2 participants