-
Notifications
You must be signed in to change notification settings - Fork 5
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
option -t do not generate code for "reduces" #11
Comments
Sorry, I did not understand your question. There are a few parsers in this code base. If it is a question about MSTA. I should check it. -t should only add debugging print. If some code is not generated. It is probably a bug. For Dino -t prints call stack at the exit. This stack might be not accurate because of call-tail optimization. There is a test in dino.tst.in implementing tiny language called GRIP. The GRIP interpreter has also option -t. But I did not write this code (somebody else wrote it). So I can not answer the question if it is about GRIP. |
Hi
Sorry for the ambiguous question...
It's a question about -t of MSTA.
Using option -t with MSTA should generate debugging print.
And there is no print generated for "reduces".
But there are for shifts, token reading, ...
…On 2016-11-26 13:06, vnmakarov wrote:
Sorry, I did not understand your question. There are a few parsers in
this code base.
If it is a question about MSTA. I should check it. -t should only add
debugging print. If some code is not generated. It is probably a bug.
For Dino -t prints call stack at the exit. This stack might be not
accurate because of call-tail optimization.
There is a test in dino.tst.in implementing tiny language called GRIP.
The GRIP interpreter has also option -t. But I did not write this code
(somebody else wrote it). So I can not answer the question if it is
about GRIP.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzAy4RTllKJZTW-ZOTUzVGgiht5--5qks5rCHUwgaJpZM4K8jVS>.
|
I see. I think it is possible to add printing about some reduces. But it will be not full information. MSTA makes a lot of optimizations. For example, if there is not action, the corresponding reduce might be part of another reduce (chain reduces). Even if there is an action, several reduces can be combined as their actions. Also MSTA for regular language can actually generate DFA where there are no reduces at all. So I can add debugging prints about reduces which have actions. But probably it is not what people would expect. |
I see. I think it is possible to add printing about some reduces. But
it will be not full information. MSTA makes a lot of optimizations.
For example, if there is not action, the corresponding reduce might be
part of another reduce (chain reduces). Even if there is an action,
several reduces can be combined as their actions.
Also MSTA for regular language can actually generate DFA where there
are no reduces at all. So I can add debugging prints about reduces
which have actions. But probably it is not what people would expect.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAzAy0POOSaKIlft5Mi8641xKYLgmeQSks5rDME1gaJpZM4K8jVS>.
Ah ! I see.
Is there an option or a combination of options that will disable
optimisations, so the debuging prints will work Ok and make senses
(corresponding to what people expects) ?
Whatever your response, you can close the ticket.
Thank you to have taken the time to respond.
|
When we use the option -t to trace parser at runtime, there is no code generated for "reduces".
Is it by design ?
The text was updated successfully, but these errors were encountered: