SlideShare una empresa de Scribd logo
1 de 107
Parsing a Sentence Using the
Syntax Diagrams

"The bearded lady
hides but the
elephant thinks this
thought."
© K.Becker

Cpsc 233 Parse a Sentence
Start with : <STATEMENT>

<Sentence>

PUNCT

- get the first string;
- find it in the dictionary

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
Start with : <STATEMENT>

<Sentence>

PUNCT

- got the first string;
- found it in the
dictionary

"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
BEGIN : <SENTENCE>
<Sentence>

PUNCT

- get the first string;
- find it in the dictionary

"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
Now IN : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
EXPECTING :
<NOUNPHRASE>
<NounPhrase> <VerbPhrase>

CONJ

<Sentence>
"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
Now IN : <NOUNPHRASE>
ProNoun

ProperNoun
Article

<AdjectiveList>
Noun

"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
EXPECTING : Pr oNoun, Pr operNoun,
Ar ticle,

or Noun
ProNoun
ProperNoun

Article

<AdjectiveList>
Noun

"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
MATCHED : Ar ticle
ProNoun
ProperNoun

Article

<AdjectiveList>
Noun

"The"
ARTICLE
"*"

The bearded lady hides but the elephant
thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence
MATCHED : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
MATCHED : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
Still IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun
"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
EXPECTING : <ADJECTIVELIST>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun
"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
Now IN : <ADJECTIVELIST>
Adjective
{nothing}

"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
EXPECTING : Adjective
Adjective
{nothing}

"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
MATCHED : Adjective
Adjective
{nothing}

"bearded"
ADJECTIVE
"baratus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"The"
ARTICLE
"*"
MATCHED : Adjective
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Adjective
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <ADJECTIVELIST>
Adjective
{nothing}

"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still EXPECTING : Adjective
Adjective
{nothing}

"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Adjective

NOT FOUND,

RETURN..
Adjective
{nothing}

"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun
"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Noun
ProNoun
ProperNoun
Article

<AdjectiveList>

Noun
"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Noun
ProNoun
ProperNoun
Article

<AdjectiveList>

Noun
"lady"
noun
"domina"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
noun
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now Leaving : <NOUNPHRASE>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun
"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <VERBPHRASE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <VERBPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <ADVERBLIST>
Verb

<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

or

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Verb
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Verb
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"hides"
VERB
"abscondo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"lady"
NOUN
"domina"

"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : Verb
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING :

<NOUNPHRASE> OR

<ADVERBLIST>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
FOUND : Conjunction instead
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now Leaving <VERBPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : CONJUNCTION
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : CONJUNCTION
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"but"
CONJ
"ceterum"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : CONJUNCTION
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCHED : CONJUNCTION
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now INTO : <SENTENCE> **
AGAIN**
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>
"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <SENTENCE>
<NounPhrase>

CONJ

** AGAIN**

<VerbPhrase>

<Sentence>

"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <NOUNPHRASE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Pr oNoun, Pr operNoun,
Ar ticle,

ProNoun

or Noun

ProperNoun
Article
<AdjectiveList>

Noun
"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
ProNoun
ProperNoun

Article

<AdjectiveList>

Noun
"the"
ARTICLE
"*"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <ADJECTIVELIST>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun

"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <ADJECTIVELIST>
Adjective
{nothing}

"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Adjective
Adjective
{nothing}

"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Adjective

NOT FOUND,

RETURN..
Adjective
{nothing}

"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Noun
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"elephant"
NOUN
"barrus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Leaving : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <VERBPHRASE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <VERBPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <ADVERBLIST>
Verb

<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

or

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Verb
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"thinks"
VERB
"cogito"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Verb
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Verb
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <VERBPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING :

<NOUNPHRASE> OR

<ADVERBLIST>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
FOUND : Ar ticle

GOTO

<NOUNPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Pr oNoun, Pr operNoun,
Ar ticle,

ProNoun

or Noun

ProperNoun
Article
<AdjectiveList>

Noun
"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
ProNoun
ProperNoun

Article

<AdjectiveList>

Noun
"this"
ARTICLE
"addo"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Ar ticle
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : <ADJECTIVELIST>
ProNoun
ProperNoun
Article

<AdjectiveList>
Noun

"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now IN : <ADJECTIVELIST>
Adjective
{nothing}

"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Adjective
Adjective
{nothing}

"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Adjective

NOT FOUND, RETURN..
Adjective
{nothing}

"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back IN : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : Noun
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"thought"
NOUN
"cogitatus"

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : Noun
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

"."
??
""

NOT FOUND....
---but we don't know or
care yet---

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Leaving : <NOUNPHRASE>
ProNoun
ProperNoun
Article
<AdjectiveList>

Noun
"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Still IN : <VERBPHRASE>
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING :

<ADVERBLIST> OR NOT

<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
FOUND : NOT , RETURN..
<AdverbList>

Verb

Verb

<NounPhrase>

<NounPhrase>

<AdverbList>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back TO : <SENTENCE>
<NounPhrase>

CONJ

** AGAIN**
"thought"

<VerbPhrase>

<Sentence>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : CONJUNCTION
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

or"thought"
NOT

NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
FOUND : NOT , RETURN..
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Back TO : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now Leaving : <SENTENCE>
<NounPhrase>

CONJ

<VerbPhrase>

<Sentence>

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Finally Back TO : <STATEMENT>

<Sentence>

PUNCT

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
EXPECTING : PUNCTUATION

<Sentence>

PUNCT

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : PUNCTUATION

<Sentence>

PUNCT

"."
??
""

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : PUNCTUATION
Push TOKEN onto QUEUE.
Get next symbol.
Find in Dictionary.

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"." / ?? / ""
"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
MATCH : PUNCTUATION
Push TOKEN onto QUEUE.
Get next symbol.
END-OF-LINE

EOLN

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"." / ?? / ""
"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
Now Leaving : <STATEMENT>

EOLN

The bearded lady hides but the
elephant thinks this thought.
© K.Becker

Cpsc 233 Parse a Sentence

"." / ?? / ""
"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
--DONE PARSING--

on to the next phase,
but first.....

© K.Becker

Cpsc 233 Parse a Sentence

"." / ?? / ""
"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"
"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"hides"
VERB
"abscondo"
"lady"
NOUN
"domina"
"bearded"
ADJECTIVE
"baratus"
"The"
ARTICLE
"*"
What the QUEUE ACTUALLY
Looks Like
(with TOKENS rather than WORDS)

© K.Becker

Cpsc 233 Parse a Sentence
What the QUEUE ACTUALLY Looks
Like
"thought"
NOUN
"cogitatus"
"this"
ARTICLE
"addo"

"thinks"
VERB
"cogito"
"elephant"
NOUN
"barrus"
"hides"
VERB
"abscondo"

"." / ?? / ""

"the"
ARTICLE
"*"
"but"
CONJ
"ceterum"
"lady"
"bearded"
ADJECTIVE
NOUN
"baratus"
"domina"
"The"
ARTICLE
"*"

token
sthe queue
© K.Becker

Cpsc 233 Parse a Sentence
What remains is to pull off the
TOKENS,
one by one,
if it is a WORD
then print out the translation,
if it is NOT
then print IT out.

© K.Becker

Cpsc 233 Parse a Sentence
AND TA-DA!!!!
A ten-word nonsense
statement gets translated into
equally non-sensical Latin
using a mere few hundred
lines of code.
© K.Becker

Cpsc 233 Parse a Sentence

Más contenido relacionado

Más de Katrin Becker

Gamification paradigm
Gamification paradigmGamification paradigm
Gamification paradigmKatrin Becker
 
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...Katrin Becker
 
Gamification how to gamify learning and instruction Part 1 (of 3)
Gamification how to gamify learning and instruction Part 1 (of 3)Gamification how to gamify learning and instruction Part 1 (of 3)
Gamification how to gamify learning and instruction Part 1 (of 3)Katrin Becker
 
Gamification how to gamify learning and instruction, part 2 (of 3)
Gamification how to gamify learning and instruction, part 2 (of 3)Gamification how to gamify learning and instruction, part 2 (of 3)
Gamification how to gamify learning and instruction, part 2 (of 3)Katrin Becker
 
Is gamification a game changer
Is gamification a game changerIs gamification a game changer
Is gamification a game changerKatrin Becker
 
CS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual MachineCS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual MachineKatrin Becker
 
CS: Introduction to Record Manipulation & Indexing
CS: Introduction to Record Manipulation & IndexingCS: Introduction to Record Manipulation & Indexing
CS: Introduction to Record Manipulation & IndexingKatrin Becker
 
CS Lesson: Creating Your First Class in Java
CS Lesson: Creating Your First Class in JavaCS Lesson: Creating Your First Class in Java
CS Lesson: Creating Your First Class in JavaKatrin Becker
 
Informing pedagogy through collaborative inquiry
Informing pedagogy through collaborative inquiryInforming pedagogy through collaborative inquiry
Informing pedagogy through collaborative inquiryKatrin Becker
 
Informing SoTL using playtesting techniques
Informing SoTL using playtesting techniquesInforming SoTL using playtesting techniques
Informing SoTL using playtesting techniquesKatrin Becker
 
Using cards games as learning objects to teach genetics
Using cards games as learning objects to teach geneticsUsing cards games as learning objects to teach genetics
Using cards games as learning objects to teach geneticsKatrin Becker
 
Gamification how to gamify learning and instruction, Part 3 (of 3)
Gamification how to gamify learning and instruction, Part 3 (of 3)Gamification how to gamify learning and instruction, Part 3 (of 3)
Gamification how to gamify learning and instruction, Part 3 (of 3)Katrin Becker
 
The decorative media trap
The decorative media trapThe decorative media trap
The decorative media trapKatrin Becker
 
When Games and Instructional Design Collide
When Games and Instructional Design CollideWhen Games and Instructional Design Collide
When Games and Instructional Design CollideKatrin Becker
 
A Magic Bullet for Educational Games
A Magic Bullet for Educational GamesA Magic Bullet for Educational Games
A Magic Bullet for Educational GamesKatrin Becker
 
A Magic Bullet for Assessing Games for Learning
A Magic Bullet for Assessing Games for LearningA Magic Bullet for Assessing Games for Learning
A Magic Bullet for Assessing Games for LearningKatrin Becker
 
Evaluating Educational Videogames
Evaluating Educational VideogamesEvaluating Educational Videogames
Evaluating Educational VideogamesKatrin Becker
 
Game Assignments in computer Science
Game Assignments in computer ScienceGame Assignments in computer Science
Game Assignments in computer ScienceKatrin Becker
 
Duck Hatching in the Classroom
Duck Hatching in the ClassroomDuck Hatching in the Classroom
Duck Hatching in the ClassroomKatrin Becker
 
The Clark-Kozma Debate in the 21st Century
The Clark-Kozma Debate in the 21st Century The Clark-Kozma Debate in the 21st Century
The Clark-Kozma Debate in the 21st Century Katrin Becker
 

Más de Katrin Becker (20)

Gamification paradigm
Gamification paradigmGamification paradigm
Gamification paradigm
 
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...
The Calm and The Storm: Simulation and Games - Why All Games are Simulations ...
 
Gamification how to gamify learning and instruction Part 1 (of 3)
Gamification how to gamify learning and instruction Part 1 (of 3)Gamification how to gamify learning and instruction Part 1 (of 3)
Gamification how to gamify learning and instruction Part 1 (of 3)
 
Gamification how to gamify learning and instruction, part 2 (of 3)
Gamification how to gamify learning and instruction, part 2 (of 3)Gamification how to gamify learning and instruction, part 2 (of 3)
Gamification how to gamify learning and instruction, part 2 (of 3)
 
Is gamification a game changer
Is gamification a game changerIs gamification a game changer
Is gamification a game changer
 
CS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual MachineCS Lesson: Introduction to the Java virtual Machine
CS Lesson: Introduction to the Java virtual Machine
 
CS: Introduction to Record Manipulation & Indexing
CS: Introduction to Record Manipulation & IndexingCS: Introduction to Record Manipulation & Indexing
CS: Introduction to Record Manipulation & Indexing
 
CS Lesson: Creating Your First Class in Java
CS Lesson: Creating Your First Class in JavaCS Lesson: Creating Your First Class in Java
CS Lesson: Creating Your First Class in Java
 
Informing pedagogy through collaborative inquiry
Informing pedagogy through collaborative inquiryInforming pedagogy through collaborative inquiry
Informing pedagogy through collaborative inquiry
 
Informing SoTL using playtesting techniques
Informing SoTL using playtesting techniquesInforming SoTL using playtesting techniques
Informing SoTL using playtesting techniques
 
Using cards games as learning objects to teach genetics
Using cards games as learning objects to teach geneticsUsing cards games as learning objects to teach genetics
Using cards games as learning objects to teach genetics
 
Gamification how to gamify learning and instruction, Part 3 (of 3)
Gamification how to gamify learning and instruction, Part 3 (of 3)Gamification how to gamify learning and instruction, Part 3 (of 3)
Gamification how to gamify learning and instruction, Part 3 (of 3)
 
The decorative media trap
The decorative media trapThe decorative media trap
The decorative media trap
 
When Games and Instructional Design Collide
When Games and Instructional Design CollideWhen Games and Instructional Design Collide
When Games and Instructional Design Collide
 
A Magic Bullet for Educational Games
A Magic Bullet for Educational GamesA Magic Bullet for Educational Games
A Magic Bullet for Educational Games
 
A Magic Bullet for Assessing Games for Learning
A Magic Bullet for Assessing Games for LearningA Magic Bullet for Assessing Games for Learning
A Magic Bullet for Assessing Games for Learning
 
Evaluating Educational Videogames
Evaluating Educational VideogamesEvaluating Educational Videogames
Evaluating Educational Videogames
 
Game Assignments in computer Science
Game Assignments in computer ScienceGame Assignments in computer Science
Game Assignments in computer Science
 
Duck Hatching in the Classroom
Duck Hatching in the ClassroomDuck Hatching in the Classroom
Duck Hatching in the Classroom
 
The Clark-Kozma Debate in the 21st Century
The Clark-Kozma Debate in the 21st Century The Clark-Kozma Debate in the 21st Century
The Clark-Kozma Debate in the 21st Century
 

Último

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxheathfieldcps1
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppCeline George
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Mark Carrigan
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project researchCaitlinCummins3
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Celine George
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxCeline George
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdfKamal Acharya
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17Celine George
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...Nguyen Thanh Tu Collection
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/siemaillard
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Celine George
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxNehaChandwani11
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya - UEM Kolkata Quiz Club
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the lifeNitinDeodare
 

Último (20)

The basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptxThe basics of sentences session 4pptx.pptx
The basics of sentences session 4pptx.pptx
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
An Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge AppAn Overview of the Odoo 17 Knowledge App
An Overview of the Odoo 17 Knowledge App
 
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...Navigating the Misinformation Minefield: The Role of Higher Education in the ...
Navigating the Misinformation Minefield: The Role of Higher Education in the ...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
SURVEY I created for uni project research
SURVEY I created for uni project researchSURVEY I created for uni project research
SURVEY I created for uni project research
 
Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17Features of Video Calls in the Discuss Module in Odoo 17
Features of Video Calls in the Discuss Module in Odoo 17
 
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
Mattingly "AI and Prompt Design: LLMs with Text Classification and Open Source"
 
An Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptxAn Overview of the Odoo 17 Discuss App.pptx
An Overview of the Odoo 17 Discuss App.pptx
 
Software testing for project report .pdf
Software testing for project report .pdfSoftware testing for project report .pdf
Software testing for project report .pdf
 
How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17How to Analyse Profit of a Sales Order in Odoo 17
How to Analyse Profit of a Sales Order in Odoo 17
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT VẬT LÝ 2024 - TỪ CÁC TRƯỜNG, TRƯ...
 
Championnat de France de Tennis de table/
Championnat de France de Tennis de table/Championnat de France de Tennis de table/
Championnat de France de Tennis de table/
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 2 STEPS Using Odoo 17
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
The Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptxThe Ball Poem- John Berryman_20240518_001617_0000.pptx
The Ball Poem- John Berryman_20240518_001617_0000.pptx
 
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General QuizPragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
Pragya Champions Chalice 2024 Prelims & Finals Q/A set, General Quiz
 
philosophy and it's principles based on the life
philosophy and it's principles based on the lifephilosophy and it's principles based on the life
philosophy and it's principles based on the life
 

CS Example: Parsing a Sentence

  • 1. Parsing a Sentence Using the Syntax Diagrams "The bearded lady hides but the elephant thinks this thought." © K.Becker Cpsc 233 Parse a Sentence
  • 2. Start with : <STATEMENT> <Sentence> PUNCT - get the first string; - find it in the dictionary The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 3. Start with : <STATEMENT> <Sentence> PUNCT - got the first string; - found it in the dictionary "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 4. BEGIN : <SENTENCE> <Sentence> PUNCT - get the first string; - find it in the dictionary "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 5. Now IN : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 6. EXPECTING : <NOUNPHRASE> <NounPhrase> <VerbPhrase> CONJ <Sentence> "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 7. Now IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 8. EXPECTING : Pr oNoun, Pr operNoun, Ar ticle, or Noun ProNoun ProperNoun Article <AdjectiveList> Noun "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 9. MATCHED : Ar ticle ProNoun ProperNoun Article <AdjectiveList> Noun "The" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence
  • 10. MATCHED : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 11. MATCHED : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 12. Still IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 13. EXPECTING : <ADJECTIVELIST> ProNoun ProperNoun Article <AdjectiveList> Noun "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 14. Now IN : <ADJECTIVELIST> Adjective {nothing} "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 15. EXPECTING : Adjective Adjective {nothing} "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 16. MATCHED : Adjective Adjective {nothing} "bearded" ADJECTIVE "baratus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "The" ARTICLE "*"
  • 17. MATCHED : Adjective Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 18. MATCHED : Adjective Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 19. Still IN : <ADJECTIVELIST> Adjective {nothing} "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 20. Still EXPECTING : Adjective Adjective {nothing} "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 21. Adjective NOT FOUND, RETURN.. Adjective {nothing} "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 22. Back IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 23. EXPECTING : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 24. MATCHED : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "lady" noun "domina" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 25. MATCHED : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" noun "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 26. MATCHED : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 27. Now Leaving : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 28. Back IN : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 29. EXPECTING : <VERBPHRASE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 30. Now IN : <VERBPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 31. EXPECTING : <ADVERBLIST> Verb <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker or Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 32. MATCHED : Verb <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 33. MATCHED : Verb Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "hides" VERB "abscondo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 34. MATCHED : Verb Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 35. EXPECTING : <NOUNPHRASE> OR <ADVERBLIST> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 36. FOUND : Conjunction instead <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 37. Now Leaving <VERBPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 38. Back IN : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 39. EXPECTING : CONJUNCTION <NounPhrase> CONJ <VerbPhrase> <Sentence> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 40. MATCHED : CONJUNCTION <NounPhrase> CONJ <VerbPhrase> <Sentence> "but" CONJ "ceterum" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 41. MATCHED : CONJUNCTION Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 42. MATCHED : CONJUNCTION Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 43. Still IN : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 44. Now INTO : <SENTENCE> ** AGAIN** <NounPhrase> CONJ <VerbPhrase> <Sentence> "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 45. Now IN : <SENTENCE> <NounPhrase> CONJ ** AGAIN** <VerbPhrase> <Sentence> "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 46. EXPECTING : <NOUNPHRASE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 47. Now IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 48. EXPECTING : Pr oNoun, Pr operNoun, Ar ticle, ProNoun or Noun ProperNoun Article <AdjectiveList> Noun "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 49. MATCH : Ar ticle ProNoun ProperNoun Article <AdjectiveList> Noun "the" ARTICLE "*" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 50. MATCH : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 51. MATCH : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 52. Still IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 53. EXPECTING : <ADJECTIVELIST> ProNoun ProperNoun Article <AdjectiveList> Noun "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 54. Now IN : <ADJECTIVELIST> Adjective {nothing} "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 55. EXPECTING : Adjective Adjective {nothing} "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 56. Adjective NOT FOUND, RETURN.. Adjective {nothing} "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 57. Back IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 58. EXPECTING : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 59. MATCH : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "elephant" NOUN "barrus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 60. MATCH : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 61. MATCH : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 62. Leaving : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 63. Back IN : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 64. EXPECTING : <VERBPHRASE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 65. Now IN : <VERBPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 66. EXPECTING : <ADVERBLIST> Verb <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker or Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 67. MATCH : Verb <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "thinks" VERB "cogito" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 68. MATCH : Verb Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 69. MATCH : Verb Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 70. Still IN : <VERBPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 71. EXPECTING : <NOUNPHRASE> OR <ADVERBLIST> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 72. FOUND : Ar ticle GOTO <NOUNPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 73. Now IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 74. EXPECTING : Pr oNoun, Pr operNoun, Ar ticle, ProNoun or Noun ProperNoun Article <AdjectiveList> Noun "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 75. MATCH : Ar ticle ProNoun ProperNoun Article <AdjectiveList> Noun "this" ARTICLE "addo" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 76. MATCH : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 77. MATCH : Ar ticle Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 78. Still IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 79. EXPECTING : <ADJECTIVELIST> ProNoun ProperNoun Article <AdjectiveList> Noun "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 80. Now IN : <ADJECTIVELIST> Adjective {nothing} "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 81. EXPECTING : Adjective Adjective {nothing} "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 82. Adjective NOT FOUND, RETURN.. Adjective {nothing} "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 83. Back IN : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 84. EXPECTING : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 85. MATCH : Noun ProNoun ProperNoun Article <AdjectiveList> Noun "thought" NOUN "cogitatus" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 86. MATCH : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 87. MATCH : Noun Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. "." ?? "" NOT FOUND.... ---but we don't know or care yet--- The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 88. Leaving : <NOUNPHRASE> ProNoun ProperNoun Article <AdjectiveList> Noun "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 89. Still IN : <VERBPHRASE> <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 90. EXPECTING : <ADVERBLIST> OR NOT <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 91. FOUND : NOT , RETURN.. <AdverbList> Verb Verb <NounPhrase> <NounPhrase> <AdverbList> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 92. Back TO : <SENTENCE> <NounPhrase> CONJ ** AGAIN** "thought" <VerbPhrase> <Sentence> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 93. EXPECTING : CONJUNCTION <NounPhrase> CONJ <VerbPhrase> <Sentence> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence or"thought" NOT NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 94. FOUND : NOT , RETURN.. <NounPhrase> CONJ <VerbPhrase> <Sentence> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 95. Back TO : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 96. Now Leaving : <SENTENCE> <NounPhrase> CONJ <VerbPhrase> <Sentence> "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 97. Finally Back TO : <STATEMENT> <Sentence> PUNCT "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 98. EXPECTING : PUNCTUATION <Sentence> PUNCT "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 99. MATCH : PUNCTUATION <Sentence> PUNCT "." ?? "" The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 100. MATCH : PUNCTUATION Push TOKEN onto QUEUE. Get next symbol. Find in Dictionary. The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "." / ?? / "" "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 101. MATCH : PUNCTUATION Push TOKEN onto QUEUE. Get next symbol. END-OF-LINE EOLN The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "." / ?? / "" "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 102. Now Leaving : <STATEMENT> EOLN The bearded lady hides but the elephant thinks this thought. © K.Becker Cpsc 233 Parse a Sentence "." / ?? / "" "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 103. --DONE PARSING-- on to the next phase, but first..... © K.Becker Cpsc 233 Parse a Sentence "." / ?? / "" "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "the" ARTICLE "*" "but" CONJ "ceterum" "hides" VERB "abscondo" "lady" NOUN "domina" "bearded" ADJECTIVE "baratus" "The" ARTICLE "*"
  • 104. What the QUEUE ACTUALLY Looks Like (with TOKENS rather than WORDS) © K.Becker Cpsc 233 Parse a Sentence
  • 105. What the QUEUE ACTUALLY Looks Like "thought" NOUN "cogitatus" "this" ARTICLE "addo" "thinks" VERB "cogito" "elephant" NOUN "barrus" "hides" VERB "abscondo" "." / ?? / "" "the" ARTICLE "*" "but" CONJ "ceterum" "lady" "bearded" ADJECTIVE NOUN "baratus" "domina" "The" ARTICLE "*" token sthe queue © K.Becker Cpsc 233 Parse a Sentence
  • 106. What remains is to pull off the TOKENS, one by one, if it is a WORD then print out the translation, if it is NOT then print IT out. © K.Becker Cpsc 233 Parse a Sentence
  • 107. AND TA-DA!!!! A ten-word nonsense statement gets translated into equally non-sensical Latin using a mere few hundred lines of code. © K.Becker Cpsc 233 Parse a Sentence