Click here to Skip to main content
15,907,329 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 10:16
mvahoney the codewitch7-May-19 10:16 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 7:55
mvahoney the codewitch7-May-19 7:55 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen7-May-19 7:58
professionalEddy Vluggen7-May-19 7:58 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 8:21
mvahoney the codewitch7-May-19 8:21 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen7-May-19 9:10
professionalEddy Vluggen7-May-19 9:10 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 9:25
mvahoney the codewitch7-May-19 9:25 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen7-May-19 9:31
professionalEddy Vluggen7-May-19 9:31 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 9:42
mvahoney the codewitch7-May-19 9:42 
Okay, so parsers work generally using a method called substitution.

I'll show you. A context free grammar is a mathematical entity. It is a type-2 language on the Chomsky scale (if your ever interested in what all that means - yours to google later, but it's not necessary here)

so here's a CFG - it's a series of rules. And a start symbol. I'll explain.

A rule takes the form of (example)

binop → num + num

- in this case marking a binary expression as "num + num" (two numbers with a + inbetween them - num is defined elsewhere as a regular expression matching a series of digits)

follow so far?

obviously that doesn't represent much of a binary expression. We need to do more than add!

let's define more rules

binop → num - num
binop → num * num
binop → num / num


that's more like it!. Now you may notice that there's the same left hand side on each of those.

A group of rules with all the same left hand side are called collectively a "non-terminal"

here, binop is a nonterminal. num is not but we'll get into that

Nonterminals can have rules that can reference terminals or other non-terminals, and even themselves recursively

A CFG tells us what the rules are, and just as importantly, which non-terminal to start at (here it would obv be binop since we haven't) declared any others.

Follow so far?
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.


modified 7-May-19 16:06pm.

GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen7-May-19 23:14
professionalEddy Vluggen7-May-19 23:14 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch8-May-19 4:06
mvahoney the codewitch8-May-19 4:06 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch8-May-19 4:46
mvahoney the codewitch8-May-19 4:46 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen8-May-19 7:18
professionalEddy Vluggen8-May-19 7:18 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch8-May-19 8:02
mvahoney the codewitch8-May-19 8:02 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen10-May-19 22:53
professionalEddy Vluggen10-May-19 22:53 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch11-May-19 7:16
mvahoney the codewitch11-May-19 7:16 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen11-May-19 23:30
professionalEddy Vluggen11-May-19 23:30 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch11-May-19 23:46
mvahoney the codewitch11-May-19 23:46 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Eddy Vluggen12-May-19 0:05
professionalEddy Vluggen12-May-19 0:05 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Mark_Wallace7-May-19 9:51
Mark_Wallace7-May-19 9:51 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Mycroft Holmes7-May-19 12:55
professionalMycroft Holmes7-May-19 12:55 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 14:13
mvahoney the codewitch7-May-19 14:13 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Christian Graus7-May-19 15:01
protectorChristian Graus7-May-19 15:01 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
honey the codewitch7-May-19 16:33
mvahoney the codewitch7-May-19 16:33 
GeneralRe: mmmm sashimi sushi for breakfast. What do you eat for brain food? Pin
Christian Graus7-May-19 16:58
protectorChristian Graus7-May-19 16:58 
Rantfinally dropping firefox - rant with happy ending Pin
lopatir7-May-19 5:03
lopatir7-May-19 5:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.