lifangda01 / SimpleParser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SimpleParser

Parse a simple sentence.

  1. Compile the grammar file
make clean
make
  1. Print the parse tree
java DumpTree < sample.txt

Parse Tree generated for the sentence "I like time." is

Start
 InputText
  Sentence
   NounPhrase
    Pronoun : I
   VerbPhrase
    Verb : like
    NounPhrase
     CompoundNoun
      Noun : time

About

License:MIT License


Languages

Language:Java 58.2%Language:Python 41.8%