Top "Grammar" questions

A formal grammar is a set of production rules that describe how to form strings of valid syntax.

Parse tree generation with Java CUP

I am using CUP with JFlex to validate expression syntax. I have the basic functionality working: I can tell if …

parsing grammar lexer jflex cup
Ruby Grammar

I'm looking for Ruby grammar in BNF form. Is there an official version?

ruby grammar bnf
A grammar that accepts the empty set by the rule S->S

This was a homework assignment problem which I know I have incorrectly answered. I gave: S -> '' meaning …

grammar context-free-grammar
Why can't a LL grammar be left-recursive?

In the dragon book, LL grammar is defined as follows: A grammar is LL if and only if for any …

grammar ll left-recursion
Reserved keywords in Objective-C?

At the CocoaHeads Öresund meeting yesterday, peylow had constructed a great ObjC quiz. The competition was intense and three people …

objective-c gcc compiler-construction grammar keyword
Learning Treetop

I'm trying to teach myself Ruby's Treetop grammar generator. I am finding that not only is the documentation woefully sparse …

ruby parsing grammar treetop
Recursive Descent Parser and Nested Parentheses

I'm new to the area of grammars and parsing. I'm trying to write a recursive descent parser that evaluates strings …

parsing grammar recursive-descent
Which type of quotes we should use in css background url ("....")? Single, double or no quote needed?

this background:url(http://url); this background:url("http://url"); or this background:url('http://url');

grammar css
Parse comment line

Given the following basic grammar I want to understand how I can handle comment lines. Missing is the handling of …

line antlr grammar comments
Chomsky Language Types

I'm trying to understand the four different Chomsky language types but the definitions that I have found don't really mean …

grammar chomsky-hierarchy