Portable Numbers Format: PNFHA
|
If you have a question you should post it, not post a link to another forum.
If you are sharing information it would be best to tell us what it is. |
Perhaps I should have included some text with this link. I am trying to create a language, which this one is called PNFHA (Portable Numbers Format High Level Language A). It is not working. It doesn't like the ID or ID = expression after a print or var command. The syntax seems to describe it okay, but it doesn't work in practice. The link is where I origionally posted it, but to get faster responses, I posted it here too. It seems that this site is the one I'm getting responses on for these sets of problems for this language, so that's good, but I wasn't sure where I would get responses. If you'd rather, I could've copied the question into here.
|
I was thinking that enabling debugging for bison when I looked at it might be a good idea. But I am having trouble enabling debugging. Here is my changed file:
Code:
%{ |
Also, the changed file now produces these errors:
Code:
* ERROR: scan error ---------- Post added 04-25-14 at 09:21 PM ---------- Here is my file I'm trying to compile: Code:
; |
I would still like to know what I did wrong in the way of enabling debugging, but I did a hack to get it to enable debugging. Here is my hack:
|
It won't let me post the code, so I'll just explain what I did for my hack. I inserted statements to always print to standard error, everywhere it conditionally prints to it. I said the same thing it wanted to say.
Now I get an output of: Code:
Starting parse |
I found out I enabled debugging fine, and I was calling flex wrong, telling it to output, "phfha.cpp", instead of "pnfha.cpp". This enabled debugging. Now the output is as follows, with an unmodified parser/lexer:
Code:
Entering state 5 |
I've got no idea what it means.
|
Okay, I've been working on it and got further. Here is my new code:
bison: Code:
%{ Code:
%option yylineno Code:
; |
I've gotten a little further. See the link for details.
---------- Post added 05-15-14 at 02:13 PM ---------- Perhaps next time, if I want to post to 2 forums, I shall copy & paste. |
I'll repeat what I posted in your other thread: you're posting far too much code. You have to go through it yourself to work out what the problem is and then post just enough to reproduce it. I doubt anyone will read through such a large amount of code, attempt to understand it and debug it for you.
|
I've gotten further. To see my current progress, please look at: http://www.linuxquestions.org/questi...43#post5206243. I posted another thread because this one was getting too old and too complicated to go on, so I'm marking this one solved, but am on this next step. There has been too many changes to continue with this thread...
|
P.S. - The only reason I posted one last time, was to show the link to a more updated thread...
|
Also, the threads on the other forum were expired...
|
All times are GMT -5. The time now is 08:59 AM. |