FAQ Database Discussion Community

Is JavaScript a Context Free Language?

This article on how browsers work explains how CSS is context free, while HTML is not. But what about JavaScript, is JavaScript context free? I am learning about CFG and formal proofs, but am a long way away from understanding how to figure this out. Does anyone know if JavaScript...

P is undecidable and not semidecidable, Q is undecidable and semidecidable and P ⊂ Q

My problem: Define two sets P and Q of words (that is, two problems) such that: P is undecidable and not semidecidable, Q is undecidable and semidecidable and P ⊂ Q

Solving a first-follow conflict in a grammar

I'm currently having problems solving this kind of a conflict in a grammar: A -> (A)A' A -> 0A' A -> 1A' A'-> NAND A A' A'-> eps The problem is that FIRST of A' is NAND - as well as a part of its FOLLOW set. And since there's...

When is the Kleene star of a finite language free?

I'm looking for references that give an algorithm to solve this problem: Problem: Given a finite alphabet Σ and a finite language L ⊆ Σ* , determine whether L* is a free monoid. Equivalently, the problem is to determine, given a finite set of strings, whether every concatenation of these...

can the language 0^n1^n be expressed as a regular grammar?

First off: I dont study computer science, just interested in formal languages. I understand that this language is not regular because a finite state machine cannot count the number of a's preceeding the b (it would need a stack) and/or because you cannot express it as a regular expression, but...