diff options
author | ronny | 2003-12-01 08:51:14 +0000 |
---|---|---|
committer | ronny | 2003-12-01 08:51:14 +0000 |
commit | 499610d4bc1d1417145b66c2382f9f1c94661952 (patch) | |
tree | 5fbd1a93dae9064b178131be939d3525518e8538 | |
parent | added version resource section (diff) |
use same default fixity and priority (infixl 9) everywhere
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1421 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | frontend/parse.icl | 8 | ||||
-rw-r--r-- | frontend/postparse.icl | 2 | ||||
-rw-r--r-- | frontend/scanner.dcl | 1 | ||||
-rw-r--r-- | frontend/scanner.icl | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/frontend/parse.icl b/frontend/parse.icl index f7e7b71..f2357cb 100644 --- a/frontend/parse.icl +++ b/frontend/parse.icl @@ -239,7 +239,7 @@ optionalPriority isinfix (PriorityToken prio) pState = (prio, pState) optionalPriority isinfix token pState | isinfix - = (DummyPriority, tokenBack pState) + = (DefaultPriority, tokenBack pState) = (NoPrio, tokenBack pState) /* @@ -399,8 +399,6 @@ wantDefinitions :: !ParseContext !ParseState -> (![ParsedDefinition], !ParseStat wantDefinitions parseContext pState = parseList (tryDefinition parseContext) pState -DummyPriority :== Prio LeftAssoc 9 - cHasPriority :== True cHasNoPriority :== False @@ -601,8 +599,8 @@ where (tspec, pState) = want pState // SymbolType | isDclContext parseContext # (specials, pState) = optionalSpecials pState - = (PD_TypeSpec pos name (if is_infix DummyPriority NoPrio) (Yes tspec) specials, wantEndOfDefinition "type definition (1)" pState) - = (PD_TypeSpec pos name (if is_infix DummyPriority NoPrio) (Yes tspec) SP_None, wantEndOfDefinition "type definition (2)" pState) + = (PD_TypeSpec pos name (if is_infix DefaultPriority NoPrio) (Yes tspec) specials, wantEndOfDefinition "type definition (1)" pState) + = (PD_TypeSpec pos name (if is_infix DefaultPriority NoPrio) (Yes tspec) SP_None, wantEndOfDefinition "type definition (2)" pState) want_rhs_of_def parseContext (opt_name, args) (PriorityToken prio) pos pState # (name, _, pState) = check_name_and_fixity opt_name cHasPriority pState (token, pState) = nextToken TypeContext pState diff --git a/frontend/postparse.icl b/frontend/postparse.icl index deb4e0a..fb10aeb 100644 --- a/frontend/postparse.icl +++ b/frontend/postparse.icl @@ -288,7 +288,7 @@ where = (fun_defs, [{ nd_dst = PE_Ident name, nd_alts = rhs_alts, nd_locals = rhs_locals, nd_position = pos } : node_defs], ca) reorganiseLocalDefinitions [PD_Function pos name is_infix args rhs fun_kind : defs] ca - # prio = if is_infix (Prio NoAssoc 9) NoPrio + # prio = if is_infix DefaultPriority NoPrio fun_arity = length args (bodies, fun_kind, defs, ca) = collectFunctionBodies name fun_arity prio fun_kind defs ca (fun_defs, node_defs, ca) = reorganiseLocalDefinitions defs ca diff --git a/frontend/scanner.dcl b/frontend/scanner.dcl index 1a5f057..6ed0019 100644 --- a/frontend/scanner.dcl +++ b/frontend/scanner.dcl @@ -125,6 +125,7 @@ instance <<< FilePosition :: Assoc = LeftAssoc | RightAssoc | NoAssoc :: Priority = Prio Assoc Int | NoPrio +DefaultPriority :: Priority class getFilename state :: !*state -> (!String,!*state) instance getFilename ScanState diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 46650d5..c27a546 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -1470,6 +1470,9 @@ where (<) _ _ = True */ +DefaultPriority :: Priority +DefaultPriority + = Prio LeftAssoc 9 determinePriority :: !Priority !Priority -> Optional Bool determinePriority (Prio assoc_left prio_left) (Prio assoc_right prio_right) |