chomsky hierarchy in plain english

Maybe you get a better understanding if you remember the automata generating these languages. Regular languages are generated by regular automata. They have only have a finit knowledge of the past (their compute memory has limits) so everytime you have a language with suffixes depending on prefixes (palindrome language) this can not be done with … Read more

Is there a standard C++ grammar?

Yes, it does. The grammar is described in detail throughout the standard and is summarized in Appendix A: Grammar Summary (it’s Appendix A in both the C++03 standard and the C++0x final committee draft). You can purchase the C++03 standard or you can download the C++0x FCD (it’s document n3092 on that page). To answer … Read more

Separate word lists for nouns, verbs, adjectives, etc

If you download just the database files from wordnet.princeton.edu/download/current-version you can extract the words by running these commands: egrep -o “^[0-9]{8}\s[0-9]{2}\s[a-z]\s[0-9]{2}\s[a-zA-Z_]*\s” data.adj | cut -d ‘ ‘ -f 5 > conv.data.adj egrep -o “^[0-9]{8}\s[0-9]{2}\s[a-z]\s[0-9]{2}\s[a-zA-Z_]*\s” data.adv | cut -d ‘ ‘ -f 5 > conv.data.adv egrep -o “^[0-9]{8}\s[0-9]{2}\s[a-z]\s[0-9]{2}\s[a-zA-Z_]*\s” data.noun | cut -d ‘ ‘ -f 5 … Read more

Is “Implicit token definition in parser rule” something to worry about?

I highly recommend correcting all instances of this warning in code of any importance. This warning was created (by me actually) to alert you to situations like the following: shiftExpr : ID ((‘<<‘ | ‘>>’) ID)?; Since ANTLR 4 encourages action code be written in separate files in the target language instead of embedding them … Read more

Does the ‘@’ symbol have special meaning in Javascript, Coffeescript or Jquery?

@ is not a valid character for a javascript identifier. Identifiers may only contain $, _, digits and letters. In coffeescript, @ means this. CoffeeScript has a few nice features related to the this keyword. First, CoffeeScript uses the @ symbol as shorthand for this.. For example, @foo is equivalent to this.foo. Second, if you … Read more