Top "Grammar" questions

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

Lisp grammar in yacc

I am trying to build a Lisp grammar. Easy, right? Apparently not. I present these inputs and receive errors... ( 1 1) 23 23 23 ui …

lisp grammar yacc
Is there a human readable programming language?

I mean, is there a coded language with human style coding? For example: Create an object called MyVar and initialize …

nlp grammar
Is HTML a context-free language?

Reading some related questions made me think about the theoretical nature of HTML. I'm not talking about XHTML-like code here. …

html grammar language-theory sgml
How is this grammar LR(1) but not SLR(1)?

I have the following grammar, which I'm told is LR(1) but not SLR(1): S ::= a A | b A c | d …

parsing grammar conflict context-free-grammar lr
How can I construct a grammar that generates this language?

I'm studying for a finite automata & grammars test and I'm stuck with this question: Construct a grammar that generates …

grammar context-free-grammar automata
Is "Implicit token definition in parser rule" something to worry about?

I'm creating my first grammar with ANTLR and ANTLRWorks 2. I have mostly finished the grammar itself (it recognizes the code …

antlr grammar antlrworks antlr4
Determine whether a grammar is an LL using pairwise disjoint test

I have three grammars: A -> aB | b | CBB B -> aB | ba | aBb C -> aaA | …

grammar disjoint-sets
Is qualified name in the member function declaration allowed?

This code is accepted by MSVC9.0. My question is whether it is legal according to the standard (the old and/…

c++ c++11 grammar qualified-name member-functions
How to get all captures of subgroup matches with preg_match_all()?

Update/Note: I think what I'm probably looking for is to get the captures of a group in PHP. Referenced: …

php regex grammar preg-match-all
How do I get a set of grammar rules from Penn Treebank using python & NLTK?

I'm fairly new to NLTK and Python. I've been creating sentence parses using the toy grammars given in the examples …

python parsing grammar nltk tagged-corpus