Search results
Top results related to what programming languages use interpreters?
Top Answer
Answered Jan 09, 2011 · 1 votes
Well, I use c#, with visual studio, and it supports, both asp.net mvc2, wpf and almost any technology in the MS domain can be adjusted to TDD, and I'm sure that there is much more in the java domain as well
look in this sites for more information
For Dot Net
For Java
1/5
Top Answer
Answered May 22, 2009 · 49 votes
The set of programs that are syntactically correct is context-free for almost all languages.
The set of programs that compile is not context-free for almost all languages. For example, if the set of all compiling C programs were context free, then by intersecting with a regular language (also known as a regex), the set of all compiling C programs that match
^int main\(void\) { int a+; a+ = a+; return 0; }$
would be context-free, but this is clearly isomorphic to the language a^kba^kba^k, which is well-known not to be context-free.
Other Answers
Answered Dec 18, 2021 · 74 votes
What programming languages are context-free? [...]
My gut tells me that functional languages might be context-free [...]
The short version: There are hardly any real-world programming languages that are context-free in any meaning of the word. Whether a language is context-free or not has nothing to do with it being functional. It is simply a matter of how complex the syntax is.
Here's a CFG for the imperative language Brainfuck:
Program → Instr Program | εInstr → '+' | '-' | '>' | '<' | ',' | '.' | '[' Program ']'
And here's a CFG for the functional SKI combinator calculus:
Program → EE → 'S' E E EE → 'K' E EE → 'I'E → '(' E ')'
These CFGs recognize all valid programs of the two languages because they're so simple.
The longer version: Usually, context-free grammars (CFGs) are only used to roughly specify the syntax of a language. One must distinguish between syntactically correct programs and programs that compile/evaluate correctly. Most commonly, compilers split language analysis into syntax analysis that builds and verifies the general structure of a piece of code, and semantic analysis that verifies the meaning of the program.
If by "context-free language" you mean "... for which all programs compile", then the answer is: hardly any. Languages that fit this bill hardly have any rules or complicated features, like the existence of variables, whitespace-sensitivity, a type system, or any other context: Information defined in one place and relied upon in another.
If, on the other hand, "context-free language" only means "... for which all programs pass syntax analysis", the answer is a matter of how complex the syntax alone is. There are many syntactic features that are hard or impossible to describe with a CFG alone. Some of these are overcome by adding additional state to parsers for keeping track of counters, lookup tables, and so on.
Examples of syntactic features that are not possible to express with a CFG:
typedef int my_int; my_int x;
E → E ^ E E → E × E E → E + E E → (E) E → num
E₀ → EA E₁ EA → E₁ + EA EA → ε E₁ → EM E₂ EM → E₂ × EM EM → ε E₂ → E₃ EP EP → ^ E₃ EP E₃ → num E₃ → (E₀)
- ["Indentation- and whitespace-sensitive languages like Python and Haskell. Keeping track of arbitrarily nested indentation levels is essentially context-sensitive and requires separate counters for the indentation level; both how many spaces that are used for each level and how many levels there are.","","Allowing only a fixed level of indentation using a fixed amount of spaces would work by duplicating the grammar for each level of indentation, but in practice this is inconvenient.","",""]
- ["The C Typedef Parsing Problem says that C programs are ambiguous during lexical analysis because it cannot know from the grammar alone if something is a regular identifier or a typedef alias for an existing type.","","The example is:","","","",""," typedef int my_int;"," my_int x;"," ","","","","","At the semicolon, the type environment needs to be updated with an entry for my_int. But if the lexer has already looked ahead to my_int, it will have lexed it as an identifier rather than a type name.","","","In context-free grammar terms, the X → ... rule that would trigger on my_int is ambiguous: It could be either one that produces an identifier, or one that produces a typedef 'ed type; knowing which one relies on a lookup table (context) beyond the grammar itself.","",""]
- ["Macro- and template-based languages like Lisp, C++, Template Haskell, Nim, and so on. Since the syntax changes as it is being parsed, one solution is to make the parser into a self-modifying program. See also Is C++ context-free or context-sensitive?","",""]
- ["Often, operator precedence and associativity are not expressed directly in CFGs even though it is possible. For example, a CFG for a small expression grammar where ^ binds tighter than ×, and × binds tighter than +, might look like this:","",""," E → E ^ E"," E → E × E"," E → E + E"," E → (E)"," E → num"," ","","This CFG is ambiguous, however, and is often accompanied by a precedence / associativity table saying e.g. that ^ binds tightest, × binds tighter than +, that ^ is right-associative, and that × and + are left-associative.","","Precedence and associativity can be encoded into a CFG in a mechanical way such that it is unambiguous and only produces syntax trees where the operators behave correctly. An example of this for the grammar above:","",""," E₀ → EA E₁"," EA → E₁ + EA"," EA → ε"," E₁ → EM E₂"," EM → E₂ × EM"," EM → ε"," E₂ → E₃ EP"," EP → ^ E₃ EP"," E₃ → num"," E₃ → (E₀)"," ","","But ambiguous CFGs + precedence / associativity tables are common because they're more readable and because various types of LR parser generator libraries can produce more efficient parsers by eliminating shift/reduce conflicts instead of dealing with an unambiguous, transformed grammar of a larger size.","",""]
In theory, all finite sets of strings are regular languages, and so all legal programs of bounded size are regular. Since regular languages are a subset of context-free languages, all programs of bounded size are context-free. The argument continues,
While it can be argued that it would be an acceptable limitation for a language to allow only programs of less than a million lines, it is not practical to describe a programming language as a regular language: The description would be far too large. — Torben Morgensen's Basics of Compiler Design, ch. 2.10.2
The same goes for CFGs. To address your sub-question a little differently,
Which programming languages are defined by a context-free grammar?
Most real-world programming languages are defined by their implementations, and most parsers for real-world programming languages are either hand-written or uses a parser generator that extends context-free parsing. It is unfortunately not that common to find an exact CFG for your favourite language. When you do, it's usually in Backus-Naur form (BNF), or a parser specification that most likely isn't purely context-free.
Examples of grammar specifications from the wild:
- BNF for Standard ML
- BNF-like for Haskell
- BNF for SQL
- Yacc grammar for PHP
Other Answers
Answered Aug 02, 2011 · 8 votes
Depending on how you understand the question, the answer changes. But IMNSHO, the proper answer is that all modern programming languages are in fact context sensitive. For example there is no context free grammar that accepts only syntactically correct C programs. People who point to yacc/bison context free grammars for C are missing the point.
2/5
Top Answer
Answered Aug 30, 2013 · 3 votes
TestComplete supports 5 scripting languages for creating tests: VBScript, JScript, DelphiScript, C++Script and C#Script. VBScript and JScript are standard Microsoft scripting languages that are used on web pages and for running Windows Script Host scripts. DelphiScript is a similar language provided by SmartBear that has the Delphi/Pascal syntax. As for C++Script and C#Script languages, they are just modifications of the JScript language and are needed only if you are working with C++ or C# Connected Applications.
So, if you are familiar with Java, the best choice is JScript. You can find the language reference in the MSDN Library.
3/5
Top Answer
Answered Aug 04, 2014 · -1 votes
There are multiple programming languages that can be used to build such a site. Most languages have web frameworks and a way to connect to a database. A web framework will assist you in creating a HTTP server (although some languages do not require web frameworks). You will probably need to utilize a database to store profile information.
Here are some popular languages and frameworks:
Python (A general scripting language)
- Flask (a microframework)
- Django (a high-level Python framework)
Ruby (A general scripting language)
- Rails (an open-source framework for Ruby)
PHP (Scripting language for web development)
JavaScript (A dynamic programming language)
- Node.JS (A framework for building quick and scalable web applications)
Hopefully this will be helpful
4/5
Top Answer
Answered Feb 04, 2010 · 52 votes
No contest -- R as the main implementation of S (and one that happens to be proper Open Source and a GNU project as well).
Not only as the S language designed precisely for this purpose (see the books by John Chambers), but the rather rich support of domain-specific packages at CRAN is second to none: over 2000 packages with proper quality control, often authored by experts in the field.
The ACM sees it the same way when it gave the ACM Software Systems Award to John Chambers in 1998 with the following citation
John M. Chambers
For The S system, which has forever altered how people analyze, visualize, and manipulate data.
For reference, other winners of this award were TeX, Smalltalk, Postscript, RPC, 'the web', Mosaic, Tcl/Tk, Java, Make, ... Not a bad company to be in.
Now, if you 'only' want to collect and summarize some data just about any procedural or functional language will do. But if you want something that was designed for programming with data then R as the main S implementation it is.
Other Answers
Answered Dec 18, 2021 · 74 votes
What programming languages are context-free? [...]
My gut tells me that functional languages might be context-free [...]
The short version: There are hardly any real-world programming languages that are context-free in any meaning of the word. Whether a language is context-free or not has nothing to do with it being functional. It is simply a matter of how complex the syntax is.
Here's a CFG for the imperative language Brainfuck:
Program → Instr Program | εInstr → '+' | '-' | '>' | '<' | ',' | '.' | '[' Program ']'
And here's a CFG for the functional SKI combinator calculus:
Program → EE → 'S' E E EE → 'K' E EE → 'I'E → '(' E ')'
These CFGs recognize all valid programs of the two languages because they're so simple.
The longer version: Usually, context-free grammars (CFGs) are only used to roughly specify the syntax of a language. One must distinguish between syntactically correct programs and programs that compile/evaluate correctly. Most commonly, compilers split language analysis into syntax analysis that builds and verifies the general structure of a piece of code, and semantic analysis that verifies the meaning of the program.
If by "context-free language" you mean "... for which all programs compile", then the answer is: hardly any. Languages that fit this bill hardly have any rules or complicated features, like the existence of variables, whitespace-sensitivity, a type system, or any other context: Information defined in one place and relied upon in another.
If, on the other hand, "context-free language" only means "... for which all programs pass syntax analysis", the answer is a matter of how complex the syntax alone is. There are many syntactic features that are hard or impossible to describe with a CFG alone. Some of these are overcome by adding additional state to parsers for keeping track of counters, lookup tables, and so on.
Examples of syntactic features that are not possible to express with a CFG:
typedef int my_int; my_int x;
E → E ^ E E → E × E E → E + E E → (E) E → num
E₀ → EA E₁ EA → E₁ + EA EA → ε E₁ → EM E₂ EM → E₂ × EM EM → ε E₂ → E₃ EP EP → ^ E₃ EP E₃ → num E₃ → (E₀)
- ["Indentation- and whitespace-sensitive languages like Python and Haskell. Keeping track of arbitrarily nested indentation levels is essentially context-sensitive and requires separate counters for the indentation level; both how many spaces that are used for each level and how many levels there are.","","Allowing only a fixed level of indentation using a fixed amount of spaces would work by duplicating the grammar for each level of indentation, but in practice this is inconvenient.","",""]
- ["The C Typedef Parsing Problem says that C programs are ambiguous during lexical analysis because it cannot know from the grammar alone if something is a regular identifier or a typedef alias for an existing type.","","The example is:","","","",""," typedef int my_int;"," my_int x;"," ","","","","","At the semicolon, the type environment needs to be updated with an entry for my_int. But if the lexer has already looked ahead to my_int, it will have lexed it as an identifier rather than a type name.","","","In context-free grammar terms, the X → ... rule that would trigger on my_int is ambiguous: It could be either one that produces an identifier, or one that produces a typedef 'ed type; knowing which one relies on a lookup table (context) beyond the grammar itself.","",""]
- ["Macro- and template-based languages like Lisp, C++, Template Haskell, Nim, and so on. Since the syntax changes as it is being parsed, one solution is to make the parser into a self-modifying program. See also Is C++ context-free or context-sensitive?","",""]
- ["Often, operator precedence and associativity are not expressed directly in CFGs even though it is possible. For example, a CFG for a small expression grammar where ^ binds tighter than ×, and × binds tighter than +, might look like this:","",""," E → E ^ E"," E → E × E"," E → E + E"," E → (E)"," E → num"," ","","This CFG is ambiguous, however, and is often accompanied by a precedence / associativity table saying e.g. that ^ binds tightest, × binds tighter than +, that ^ is right-associative, and that × and + are left-associative.","","Precedence and associativity can be encoded into a CFG in a mechanical way such that it is unambiguous and only produces syntax trees where the operators behave correctly. An example of this for the grammar above:","",""," E₀ → EA E₁"," EA → E₁ + EA"," EA → ε"," E₁ → EM E₂"," EM → E₂ × EM"," EM → ε"," E₂ → E₃ EP"," EP → ^ E₃ EP"," E₃ → num"," E₃ → (E₀)"," ","","But ambiguous CFGs + precedence / associativity tables are common because they're more readable and because various types of LR parser generator libraries can produce more efficient parsers by eliminating shift/reduce conflicts instead of dealing with an unambiguous, transformed grammar of a larger size.","",""]
In theory, all finite sets of strings are regular languages, and so all legal programs of bounded size are regular. Since regular languages are a subset of context-free languages, all programs of bounded size are context-free. The argument continues,
While it can be argued that it would be an acceptable limitation for a language to allow only programs of less than a million lines, it is not practical to describe a programming language as a regular language: The description would be far too large. — Torben Morgensen's Basics of Compiler Design, ch. 2.10.2
The same goes for CFGs. To address your sub-question a little differently,
Which programming languages are defined by a context-free grammar?
Most real-world programming languages are defined by their implementations, and most parsers for real-world programming languages are either hand-written or uses a parser generator that extends context-free parsing. It is unfortunately not that common to find an exact CFG for your favourite language. When you do, it's usually in Backus-Naur form (BNF), or a parser specification that most likely isn't purely context-free.
Examples of grammar specifications from the wild:
- BNF for Standard ML
- BNF-like for Haskell
- BNF for SQL
- Yacc grammar for PHP
Other Answers
Answered Aug 02, 2011 · 8 votes
Depending on how you understand the question, the answer changes. But IMNSHO, the proper answer is that all modern programming languages are in fact context sensitive. For example there is no context free grammar that accepts only syntactically correct C programs. People who point to yacc/bison context free grammars for C are missing the point.
5/5
www.freecodecamp.org › news › compiled-versusInterpreted vs Compiled Programming Languages: What's the ...
www.freecodecamp.org › news › compiled-versusJan 10, 2020 · Compilers and interpreters take human-readable code and convert it to computer-readable machine code. In a compiled language, the target machine directly translates the program. In an interpreted language, the source code is not directly translated by the target machine.
People also ask
Which programming languages use interpreters?
- The use of Interpreters is mostly in Programming and Development Environments. Object code is permanently saved for future use. No object code is saved for future use. C, C++, C#, etc are programming languages that are compiler-based. Python, Ruby, Perl, SNOBOL, MATLAB, etc are programming languages that are interpreter-based.
Difference between Compiler and Interpreter - GeeksforGeeks
www.geeksforgeeks.org/difference-between-compiler-and-interpreter/Why do we need an interpreter?
- The first and vital need of an interpreter is to translate source code from high-level language to machine language. However, we already had the compiler to serve the purpose, the compiler is a very powerful tool for developing programs in a high-level language. However, there are several demerits associated with the compiler.
Introduction to Interpreters - GeeksforGeeks
www.geeksforgeeks.org/introduction-to-interpreters/What is an interpreter in Computer Science?
- In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:
Interpreter (computing) - Wikipedia
en.wikipedia.org/wiki/Interpreter_(computing)Are interpreters smaller than compilers?
- Interpreters, more often than not are smaller than compilers. The simple role of an interpreter is to translate the material into a target language. An Interpreter works line by line on a code. It also converts high-level language to machine language. Programs written in an Interpreted language are easier to debug.
Difference between Compiler and Interpreter - GeeksforGeeks
www.geeksforgeeks.org/difference-between-compiler-and-interpreter/en.wikipedia.org › wiki › Interpreter_(computing)Interpreter (computing) - Wikipedia
en.wikipedia.org › wiki › Interpreter_(computing)In computer science, an interpreter is a computer program that directly executes instructions written in a programming or scripting language, without requiring them previously to have been compiled into a machine language program. An interpreter generally uses one of the following strategies for program execution:
www.geeksforgeeks.org › introduction-to-interpretersIntroduction to Interpreters - GeeksforGeeks
www.geeksforgeeks.org › introduction-to-interpretersJun 10, 2023 · Some examples of programming languages that use interpreters are Python, Ruby, Perl, PHP, and MATLAB. Top Interpreters According to the Computer Languages.
www.programiz.com › article › difference-compilerInterpreter Vs Compiler : Differences Between Interpreter and ...
www.programiz.com › article › difference-compilerBoth compilers and interpreters are used to convert a program written in a high-level language into machine code understood by computers. However, there are differences between how an interpreter and a compiler works.
builtin.com › compiler-vs-interpreterCompiler vs. Interpreter in Programming | Built In
builtin.com › compiler-vs-interpreterApr 24, 2023 · Compiler: A compiler translates code from a high-level programming language into machine code before the program runs. Interpreter: An interpreter translates code written in a high-level programming language into machine code line-by-line as the code runs.
www.educative.io › blog › compiled-vs-interpretedCompiled vs interpreted language: Basics for beginning devs
www.educative.io › blog › compiled-vs-interpretedJul 6, 2022 · One quick note: programming languages are not themselves compiled or interpreted and can be implemented with either a compiler or an interpreter. But for simplicity’s sake, we’ll be referring to compiled and interpreted languages throughout this article. We’ll cover: A broad introduction to programming languages. What is a compiled language?
www.geeksforgeeks.org › difference-betweenDifference between Compiler and Interpreter - GeeksforGeeks
www.geeksforgeeks.org › difference-betweenJun 12, 2023 · An Interpreter is a program that translates a programming language into a comprehensible language. The interpreter converts high-level language to an intermediate language. It contains pre-compiled code, source code, etc. It translates only one statement of the program at a time. Interpreters, more often than not are smaller than compilers.
Searches related to What programming languages use interpreters?