DEPARTMENT OF COMPUTER SCIENCE
MONASH UNIVERSITY

Clayton, Victoria 3168 Australia


TECHNICAL REPORT 96/256.html


The design and implementation of SPECS: An alternative C++ syntax

B Werther and D M Conway

ABSTRACT

We describe an alternative syntactic binding for C++. This new binding greatly simplifies the use of many C++ constructs and reduces the likelihood of simple syntactic errors, such as unintended assignments with conditionals. The new binding includes a completely redesigned declaration/definition syntax for types, functions and objects, a simplified template syntax, and changes to several operators and control structures. The resulting syntax is LALR(1) parsable (with no conflicts and no need for semantic feedback to the lexer) and provides better consistency in the specification of similar constructs, better syntactic differentiation of dissimilar constructs, and greater overall readability of code.