The tag compiler-construction should be applied to questions concerning the programming of compilers or for questions about the detailed inner workings of compilers. DO NOT USE for questions about *using* specific compilers or compilation errors.

learn more…| top users | synonyms (2)

0
votes
2answers
16 views

Yacc, Syntax error in line 1 always except when blank input

I've tried to make a mini c compiler with the help of lex and yaccBelow is the yacc/bison code:%{#include <stdio.h>#include <stdlib.h>extern FILE *fp;extern int line;extern int ...
-1
votes
0answers
46 views

How Getting Start Create Self Native Compiler Using LLVM and C? [on hold]

how create Self-Cmpiler Using C and LLVM (Win,Linux,Mac).i can create lexer,parser,ast,virtual machine,interpreter.Self-Compiler not mean interpreter or JIT.Self-Compiler mean no require another ...
-2
votes
0answers
26 views

Understanding the syntax of BNF

So I'm taking a class right now where I think we're learning how compilers derive their syntax and understand the tokens that they read in; however, I really don't understand some of the examples that ...
-1
votes
0answers
23 views

Given the following syntax in BNF of a simple language, show a derivation of a sentence of at least 7 tokens in the language

I am studying for an exam and came across a prior exam on coursehero, with a question I didn't quite understand. It is:Given the following syntax in BNF of a simple language, show a derivation of a ...
0
votes
1answer
26 views

What is the difference between compiler and interpreter in terms of Scoping?

We say that scope of compiler is static while scope of interpreter is dynamic so what is the significance of the word Scope here and why is it static in case of compiler and dynamic in case of ...
0
votes
0answers
51 views

Symbol Table using Google Guava in Java

I've done some research on Symbol Table, visually they are just hashtable with multiple values. I found an example online that uses libraries (Google Guava) however, I was wondering if using it will ...
0
votes
1answer
50 views

How do compilers compile for different machines

I'm a Comp Sci major, and am working toward creating my own programming language as one of my projects this semester. But I'm stuck on one part of the compilation stage.As I understand, this is the ...
0
votes
3answers
80 views

writing special characters to output port in scheme (compiler design)

I have a homework assignment to create a compiler in chez scheme for chez scheme (to x64 assembly).My technique so far has been to create a giant string, which I then display on a file. For example ...
-1
votes
0answers
28 views

Creating a custom compiler that will render out JavaScript in multiple instances of a web document

I'm currently researching for a personal project; basically creating a compiler that takes JavaScript written in a foreign language and tokenizes it, which then converts the tokens into JavaScript ...
1
vote
0answers
35 views

Where can I find a BNF for the Swift programming language [closed]

What I'd like to know: As the question states, does a formal BNF exist for swift? If so, where?What I've tried:The closest thing I can find is a language reference, but it explicitly states it ...
0
votes
0answers
26 views

How to make a grammar LL(1)?

I have this grammar that has to be transformed to LL(1) grammar:S->AA->BC|DBCB->Bb|epsilonC->c|epsilonD->a|b|dAfter applying left recursion and left factoring to it, I get the ...
0
votes
2answers
48 views

Java - Semantic Analysis: Implementing a hash table with a key and multiple value

In semantic analysis one of the most popular method or data structure used is Hash Table. Implementing hash table is relatively easy however reading this peresentation made it complex for me - I don't ...
-2
votes
0answers
45 views

Lexer throwing an error that it shouldn't

I am working on a Lexer as the first part of building a compiler for a class. As part of the project grammar, the lexer should ignore any comment blocks in the files it reads, which would start with a ...
0
votes
1answer
34 views

Add nested-function support in a language the based on a stack-machine

Suppose I have a simple C-like programming language: int foo() {int x=10;int bar(y int) {return y * 2}return bar() + x}Like you can see, it supports nested ...
3
votes
2answers
53 views

Implement the internal processing for C #include directives

I need to think in the cleanest possible way to implement the functionality of the #include directive for a C compiler.I only know how implement the external part of the processing: Get the '#' char ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,