context-free-grammar
First and follow of the non-terminals in two grammars
Given following grammar S -> L=L s -> L L -> *L L -> id 开发者_开发百科 What is the first and follow for the non-terminals?[详细]
2022-12-20 04:48 分类:问答Is this context-free grammar a regular expression?
I have a grammar defined as follows: A -> aA开发者_运维知识库*b | empty_string Is A a regular expression?I\'m confused as to how to interpret a BNF grammar.No, this question doesn\'t actually ha[详细]
2022-12-19 10:52 分类:问答Does anyone recognise this unfamiliar notation?
I have a question from a test in a Programming Languages class that is confusing me. Give a context-fre开发者_开发技巧e grammar to generate the following language[详细]
2022-12-13 12:10 分类:问答Elimination left recursion for E := EE+|EE-|id
How to eliminate left recursion for the following grammar? E := EE+|EE-|id Using the common procedure: A := Aa|b[详细]
2022-12-09 04:01 分类:问答Context Free Grammar for Unary Addition
Given an alphabet of 1s I want to parse addition of the form 1^k + 1^j = 1^k+j This is pretty easy to represent with a pushdown automaton simply by pushing a 1 on to the stack on each of the first[详细]
2022-12-08 08:10 分类:问答