Questions tagged [intermediate-code]
44 questions
0
votes
1 answer
Given a string output it in a specific way using recursion?
Given a string we have to output the string in a special way.
• If the string consists of one char, we output that char normally.
• Otherwise, we divide the string into two equal parts (if the number of letters in the substr is odd, the second part…

lpobor17
- 1
0
votes
1 answer
How do I make a number in a StringVariable increase by 1 every 5 seconds in Tkinter
So i've been coding a Cookie Clicker prototype in Tkinter and I stumbled with this problem:
I first made an option that when pressed, makes every click worth 2 points(It has a price).
Then I wanted to make another option that when pressed, it would…

Eduardox33
- 11
- 3
0
votes
1 answer
bad_alloc when attempting to print string that was assigned to member of $$ struct
During our compiler's intermediate code generation phase, and more specifically while testing the arithmetic expressions and assignment rules, I noticed that although the respective quads are constructed successfully, when printing them out…

Stelios Papamichail
- 955
- 2
- 19
- 57
0
votes
1 answer
LLVM optimization passes break recursive code
I have a problem regarding some LLVM optimization passes, which modify the compilation output, so that it is not functional anymore.
This is the input source code of a Fibonacci algorithm:
f fib(int n) {
if n <= 1 { return 1; }
return…

ChilliBits
- 135
- 1
- 9
0
votes
1 answer
Can yacc be used to generate three address code for Java 1?
I have read that yacc generates bottom up parser for LALR(1) grammars. I have a grammar for Java 1 that can be used for generating three address code and is strictly LALR(1), but the translation scheme I am employing makes it L-attributed. Now I…

Shashank Kumar
- 65
- 8
0
votes
2 answers
Login System C++: After entering my string User & Pass, It asks me to re-input them
My code is a Shop that I am trying to build, it works(Register system working) until I input my User and Password(Login System), after inputting my Username, the program asks me to re-login and it keeps doing it(Pretty sure it is because it is a…

Blacklight1098
- 1
- 1
0
votes
2 answers
yosys rtlil dumps incomplete
I'm trying to make sense of what yosys is doing to my verilog source, so I have inserted a number of dump processes into my script. I assume that these are in what the manual describes as ILANG? Looking through the dump immediately after reading in…

Bill Purvis
- 1
- 2
0
votes
1 answer
Compiler intermediate code generation three address code fjump
What does FJUMP mean in this context?
The following is a Three Address Code (TAC) Intermediate Representation for a register machine: it contains a function called foo, which takes an integer parameter n and a parameter a which is an array of…

user2976568
- 149
- 1
- 2
- 12
0
votes
1 answer
Intermediate Code Generation for my Fortran compiler: DAG or quadruples
I'm writing a mini Fortran compiler using Flex and Bison. Up to now I've finished the lexical and syntax analysis. I'm in the semantic analysis in type checking and I must now choose an IR. My target machine is MIPS. So I want final code generation…

gon1332
- 1,930
- 1
- 24
- 30
0
votes
0 answers
How can I make Linux Kernel intermediate file (.i) for different arch?
I'm trying to run the command on x86_64, for Linux 3.10:
$ make drivers/net/ethernet/broadcom/bcm63xx_enet.i
The problem is that this file is to be built on MPIS arch that is different from my own. How can I configure my build environment so I can…

Peter
- 1,753
- 18
- 19
0
votes
2 answers
How do we know how big to set the Heap?
I'm trying to convert Java to an intermediate language and am in the process of figuring out how the intermediate language works.
I have the original Java code: http://cs.ucla.edu/classes/spring11/cs132/cs132/mj/Factorial.java
And I have the…

pauliwago
- 6,373
- 11
- 42
- 52
0
votes
1 answer
Intermediate code generator for Java
is there a tool for generating intermediate code for java files?Or are there any resources that could help in generating one?Thanks.

marchemike
- 3,179
- 13
- 53
- 96
-1
votes
2 answers
How to generate a postfix notation from code segment?
please can anyone explain with out the use of any programming language tool, what is the rule for converting a code segment,(not an expression) to postfix notation....Thank you I appreciate in advance of your responses

oboro oizamisi
- 1
- 1
-3
votes
1 answer
C++ Help - Using Ctime in a function to timestamp variables
all!
I'm trying to find the best way to accept user input, timestamp it, then place it into a file with correct formatting (One timestamp/input per line. What is the best way to timestamp then give over to put it all in a file? Thanks!
Heres my…

Connor Sanders
- 3
- 5