context-free-grammar
Generating all terminal strings in Python with grammar/rules?
I\'m trying to generate all terminal strings from a given file up to a certain length. So for instance, if you have something like[详细]
2023-04-04 08:38 分类:问答ANTLR - The following alternatives can never be matched
I am unable to understand why this simple grammar - grammar Test; file:ID; ID:.*; leads to this error - Test.g:3:6: The follo开发者_开发问答wing alternatives can never be matched: 1[详细]
2023-03-30 12:07 分类:问答xml node name validation
I want to create regex which will validate xml node name. I have found grammar for names, but I don\'t know what some parts of it means. http://www.xml.com/pub/a/2001/07/25/namingparts.html[详细]
2023-03-29 02:44 分类:问答Closure properties of context-free languages and intersection with regular languages
The intersection of a context-free language and a regular language is always context-free but context-free languages are not closed under set intersection. Could anyone explain why both theorems are t[详细]
2023-03-27 23:34 分类:问答Good BNF grammar tutorial / introduction for a beginner?
What\'s your tip for an introduction to BNF grammar (and how to use them in practice)? Something concise with many examples would be great. Have been googling but only found enormously long artcles[详细]
2023-03-22 04:42 分类:问答Grammar Induction Program - Squitor
Does anyone know of a program that does grammar induction? For exam开发者_高级运维ple, where can I find the source code for the REQUITER Context Free Grammar program? There are several implementations[详细]
2023-03-19 07:29 分类:问答Chomsky Normal Form correctness
I have these productions: S->aSb S-> eps(eps=empty string) I should apply the Chomsky Normal Form My reasoning:[详细]
2023-03-18 12:29 分类:问答Tokenization, Lexical Analysis, BNF, Context Free Grammar [closed]
Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it'开发者_如何学Cs on-topic for Stack Overflow.[详细]
2023-03-17 04:30 分类:问答How to express a context free design grammar as an internal DSL in Python?
[Note: Rereading this before submitting, I realized this Q has become a bit of an epic. Thank you for indulging my long explanation of the reasoning behind this pursuit. I feel that, were I in a posit[详细]
2023-03-16 16:03 分类:问答Conversion to Chomsky Normal Form
I do need your help. I have these productions: 1) A--> aAb 2) A--> bAa 3) A--> ε I should apply the Chomsky Normal Form (CNF).[详细]
2023-03-15 23:21 分类:问答