Top "Grammar" questions

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

Combining a Tokenizer into a Grammar and Parser with NLTK

I am making my way through the NLTK book and I can't seem to do something that would appear to …

python nlp grammar nltk
Bison: Optional tokens in a single rule

i'm using GNU Bison 2.4.2 to write a grammar for a new language i'm working on and i have a question. …

grammar bison flex-lexer
Token recognition error: antlr

I have an ANTLR 4 grammar: grammar Test; start : NonZeroDigit '.' Digit Digit? EOF ; DOT : '.' ; PLUS : '+' ; …

antlr grammar antlr4 lexer antlrworks2
What are the rules of semicolon inference?

Kotlin provides “semicolon inference”: syntactically, subsentences (e.g., statements, declarations etc) are separated by the pseudo-token SEMI, which stands for “…

kotlin syntax grammar
BNF vs EBNF vs ABNF: which to choose?

I want to come up with a language syntax. I have read a bit about these three, and can't really …

syntax grammar bnf ebnf
Bison java examples

Does anyone knows if there are some tutorials and/or examples of using GNU Bison with Java over the net. …

java grammar bison yacc parser-generator
What is the difference between Lexical grammar and Syntactic grammar?

I am reading The Java Language Specification 8. I am trying to understand Chapter 2. Grammars. Here's what I have already learned: …

java grammar context-free-grammar lexical
Resolving reduce/reduce conflict in yacc/ocamlyacc

I'm trying to parse a grammar in ocamlyacc (pretty much the same as regular yacc) which supports function application with …

parsing ocaml grammar yacc
How do I generate sentences from a formal grammar?

What's a common way of generating sentences from a grammar? I want an algorithm that's sort of the opposite of …

compiler-construction computer-science grammar parsing
How to resolve a shift-reduce conflict in unambiguous grammar

I'm trying to parse a simple grammar using an LALR(1) parser generator (Bison, but the problem is not specific to …

parsing grammar shift-reduce-conflict lalr