I know the parsing logic of bottom up parsers, that they start from the terminal and reduce it to the start symbol. But what really confuses me is the construction of LR(0)/LR(1) sets :
Eg : S->Sa|a
Then in LR(0) set :
S'->.S
S->.Sa
S->.a
Now the dot is in front of S , so shouldn't the S production be generated again and again and make it go to an inf. loop?