Grammars galore

Skip to end of metadata
Go to start of metadata

Introduction

Being able to build a grammar from a short description or exemplar is an important skill for language tools developer to have. In these exercises you will build a variety of grammars in order to get use to doing this. Use ANTLRWorks and tester grammars with either the interpreter or the debugger.

Expressions

Build an expression evaluator that has integers as atoms with the following mythical binary operators and precedence.

operator precendence
# highest
_ $ 2nd highest
@ lowest

Allow parentheses to group expressions. Examples: 2 $ 3 # x and (2$3)#x.

Function lists

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.