FAQ Database Discussion Community


Not sure if this LR(1) grammar has shift/reduce conflict

parsing,compiler-construction,programming-languages,grammar,lr
I'm trying to solve question on LR(1) grammar : S->AA A->Aa A-> b I got stuck in state 4 when : S-> AA. ,$ A-> A.a ,$ A->.Aa ,$ A->.a ,$ a and A shifted to other state and A is reduced in the same state should I consider this...

C++ weird function overloading between char * and bool [duplicate]

c++,programming-languages
This question already has an answer here: Why does a quoted string match bool method signature before a std::string? 3 answers The following test program has two functions with same name, different param types. I called the function by passing a conditional expression as the param. I'm expecting Write(value...

Is it possible to create a universal intermediate programming language?

programming-languages
What I mean is, is there a language or could one be designed, such that all high level programming languages could be compiled into this intermediate language? This is excluding machine languages....

What programming language should I learn to do this? [closed]

programming-languages
So I'm planning to make a web-based console-like thing. It's like, there will be buttons, and when a specific button was clicked, it will create a .txt file and write something in it. I wonder what language should I learn that can make a file and edit it like I...

Go Lang mysql html comments

go,programming-languages
I would like to create a mysql form for comments and display them as well in html. I am able to use the MySQL package to read out data in the terminal but am struggling to output on the html/template engine any pointers welcome.

Getting started with iOS programming [closed]

ios,ios7,programming-languages,ios-simulator,development-environment
I am qualified experienced software engineer. Strong background in OOP/D C++, Symbian, large multi thread multi process server applications, smart phone applications. More recently android, Java, C#, windows .net asp.net. I am looking for 'recommendations' for a fast track entry to learning to develop in objective C and for iOS....

Do any computer languages not use a stack? [closed]

data-structures,programming-languages
Do any computer languages not use a stack data structure to keep track of execution progress? Or is the use of this data structure an emergent requirement stemming from something inherent to most computer languages or turing machines?...

Hypothetical Non-Null Language - How would a Linked List be implemented?

null,linked-list,language-agnostic,programming-languages,non-nullable
Suppose you are writing in a programming language where null simply doesn't exist. It either uses empty objects or throws a ObjectNonexistentException or something similar. Now you want to implement a linked list. But: You can't point to null to end the list. If you point to an empty object...

Continuation in a mainstream-ish programming language [closed]

programming-languages,computer-science
I need a mainstream language that supports continuations. Java never will (breaks finally), Scala has deprecated it, ruby is silently deprecating it as well... Does any other mainstream, non FP-only language support them and does not plan to deprecate it? I actually need the ability to jump back in the...

Multiple programming languages [closed]

programming-languages
I want to asking you about multiple programming language. For now I am familiar with javascript (dhtmlx library) and php. Learning basic of these languages take couple weeks. But if I want do this, do that (advanced level) take more time, months even years. Three years ago, I am familiar...

Why can't JavaScript dictionary keys start with a number using the myDict.123 syntax?

javascript,dictionary,programming-languages,language-design,identifier
Preface The answer to this question may very well be "because the creators of JavaScript decided so." Mostly I'm just curious if there's a specific reasoning behind this decision, aside from mere consistency with other identifiers/variable names and other languages. Question This is legal: var foo = { "1abc": "bar",...

Concept of 'serializing' complete memory of object

performance,serialization,programming-languages
I would like to ask a very general question about a technical concept of which I do not know whether it exists or whether it is feasible at all. The idea is the following: I have an object in Garbage Collected language (e.g. C# or Java). The objects may itself...

C++ GUI Challenge

c++,graphics,programming-languages,monogame
Recently I was challenged by a friend to create a snake game much like the classic Nokia version using the C++ language. I have been programming in Java, but unlike Java, C++ doesn't seem to have standard gui libraries. Therefore after looking into GUI for C++ many different api are...

Best program to create Java games? [closed]

java,3d,ide,programming-languages,2d-games
Not much to it Java Windows 8.1 32 bit Still beginner 2D Thanks...

Java EE VS. Java SE programming

java,java-ee,programming-languages
I know the difference between Java EE and Java SE. But my question, is there difference in the Java programming language for Java SE and Java EE? Means I've learned Java and worked on Java SE but if I have to work on Java EE, do I need to learn...

How do people create new programming languages?

c,programming-languages,computer-science,systems-programming,inventions
I'm novice programmer, learning C. Something that's always confused me is how do people create new programming languages? Sub/related questions: What language do they write it in? Does the language have to be one that in between a high level language and machine code? What are the stages/elements of creating...

Item set and SLR(1) Questions in Compiler

compiler-construction,programming-languages,grammar,ll,lalr
I ran into a Old Exam question that solved by our TA. anyone could help me? when we create SLR(1) about S--> aSb | a grammar, one of the item set LR(0) is like as: { S-->a.Sb, S-->a., S-->.aSb, S-->.a} about extracted rule from above set, which of them is...

Language class compilable to heapless runtime

compiler-construction,programming-languages,computation-theory,memory-model,turing-complete
So in the general case, a program uses both memory in the stack (automatically managed) and heap (garbage collected or manually managed). What is the class of programs that can be compiled to use memory in a stack-like fashion only and no heap allocation? Is it still Turing-complete with some...

Given grammar ambiguous or not?

programming-languages,grammar,context-free-grammar,language-theory
Consider the grammar below... bexp -> bterm | bterm ‘||’ bexp bterm -> bfact | bfact ‘&&’ bterm bfact -> true | false | id | ‘(‘ bexp ‘)’ Suppose we extend BEXP with the '!' operator for negation by changing the bfact rule as follows:- bfact -> true |...

associativity of operations regarding floating points

compiler-construction,programming-languages,associativity,compiler-design
I am trying to understand tthe associativity of operations when it comes to floating points. In the lecture notes i have, the following is stated: "suppose floating-point values store seven digit of accuracy. Considee the problem of adding 11 numbers together, where one of the numbers is 10^7 and the...

What does it mean when one language is a parallel superset of another?

c++,c,concurrency,programming-languages,real-time
I'm reading a journal article about Real-Time Concurrent C, and it mentions in the abstract (so any of you can see the context through that link as well) that "Concurrent C, is a parallel superset of C (and of C++)". Now I know what a superset is, but what do...