There could be any number of reasons for dogs licking floors from the simple to the more complex:
If it's not just a sign of stress or boredom, Hypoadrenocorticism (Cushing's Disease), liver failure or neurological disease may be part of the cause.
When the floor licking is combined with grass eating, you have more reason to suspect an intestinal problem. A dog may ingest grass in order to cause vomiting. If they've eaten something foreign or that is causing stomach upset, they add fiber in the form of grass to help move things through or give enough bulk to it to be brought back up. It can act as an irritant.
There are a few cases where owners find their dog licking things to seemingly "settle" an upset stomach after vomiting. What's more likely happening is that the dog is replacing food and fiber with something they like the taste of.
It may be a tooth or gum problem too.
Assessment by a veterinarian is necessary in order to rule out physical cause.
When physical causes of compulsive licking is ruled out (and it must be ruled out first), addressing the OCD (Obsessive Compulsive Disorder) with behavior modifications and consideration of medication may be undertaken.
Find out more here: http://www.merckvetmanual.com/mvm/index.jsp?cfile=htm/bc/140217.htm&hide=1
I hope this helps.