diff --git a/NewspeakGrammar.ns b/NewspeakGrammar.ns index 9a994003..eae5fe97 100644 --- a/NewspeakGrammar.ns +++ b/NewspeakGrammar.ns @@ -240,9 +240,9 @@ AS YET UNTESTED. classReservedWord = tokenFromSymbol: #class. - className = identifier. + classId = identifier. - classPrefix = classReservedWord, className, optionalFactorySection, superclassClause opt. + classPrefix = classReservedWord, classId, optionalFactorySection, superclassClause opt. mixinApplication = classPrefix, inverseMixinOperator, sendExpression. @@ -260,10 +260,10 @@ AS YET UNTESTED. (tokenFromSymbol: #super). public classHeader = - (accessModifier opt, classReservedWord, className, messagePattern, equalSign, + (accessModifier opt, classReservedWord, classId, messagePattern, equalSign, superclassClause opt, lparen, classComment opt, slotDecls opt, initExprs, rparen) | - (accessModifier opt, classReservedWord, className, empty, equalSign, + (accessModifier opt, classReservedWord, classId, empty, equalSign, superclassClause opt, lparen, classComment opt, slotDecls opt, initExprs, rparen). (* A gross hack to allow for a default constructor pattern. This should at least be refactored (note the awful use of empty to keep the arity the same for the wrappearr in the parser. Ugh). @@ -288,8 +288,8 @@ It would be nice to just say messagePattern opt]. Alas, because the '|' operator inheritanceListAndOrBody = defaultSuperclassAndBody | explicitInheritanceListAndOrBody. public classDecl = - (accessModifier opt, classReservedWord, className, messagePattern, equalSign, inheritanceListAndOrBody) | - (accessModifier opt, classReservedWord, className, empty, equalSign, inheritanceListAndOrBody). + (accessModifier opt, classReservedWord, classId, messagePattern, equalSign, inheritanceListAndOrBody) | + (accessModifier opt, classReservedWord, classId, empty, equalSign, inheritanceListAndOrBody). toplevelClass = classCategory, classDecl. compilationUnit = languageId, toplevelClass, eoi.