Skip to main content
Commonmark migration
Source Link

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

 

$S \rightarrow a S b S \mid b S a S \mid \epsilon$

I don't know what I'm supposed to do here. The definition in the book about languages says this (and that's pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I'm not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

 

$S \rightarrow a S b S \mid b S a S \mid \epsilon$

I don't know what I'm supposed to do here. The definition in the book about languages says this (and that's pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I'm not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

$S \rightarrow a S b S \mid b S a S \mid \epsilon$

I don't know what I'm supposed to do here. The definition in the book about languages says this (and that's pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I'm not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

added 8 characters in body
Source Link
Dave Clarke
  • 20.3k
  • 4
  • 68
  • 113

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

$S \rightarrow a S b S |b S a S | \epsilon$$S \rightarrow a S b S \mid b S a S \mid \epsilon$

I don´tdon't know what I´mI'm supposed to do here. The definition in the book about languages says this (and that´sthat's pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I´mI'm not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

$S \rightarrow a S b S |b S a S | \epsilon$

I don´t know what I´m supposed to do here. The definition in the book about languages says this (and that´s pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I´m not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

This is a question from the Dragon book (I apologize for translation mistakes, I don´t have the English version on hand):

What language is generated by this grammar?

$S \rightarrow a S b S \mid b S a S \mid \epsilon$

I don't know what I'm supposed to do here. The definition in the book about languages says this (and that's pretty much it in the chapter):

a language is the set of all words that can be produced by any parse tree.

So, if I want to make "any" parse tree out of this grammar, I can recursively keep building it, using just the first two rules. I searched a bit and got the impression that every rule has to be used once, but I'm not sure. It would be very helpful if someone were able to provide some tips on solving these sorts of problems.

edited tags
Link
Ran G.
  • 20.8k
  • 3
  • 60
  • 116
Tweeted twitter.com/#!/StackCompSci/status/313782829823692800
deleted 4 characters in body; edited title
Source Link
Patrick87
  • 12.9k
  • 1
  • 44
  • 76
Loading
Source Link
dan
  • 223
  • 1
  • 3
  • 8
Loading