]> git.lizzy.rs Git - metalua.git/blobdiff - src/compiler/gg.lua
improved messages clarity, following suggestions by D. Manura
[metalua.git] / src / compiler / gg.lua
index afab9965042afba47315f509078d52a46a15ffc4..67ed3a9598d9045649d42aea098776c1e1693cb7 100644 (file)
@@ -90,11 +90,11 @@ local function raw_parse_sequence (lx, p)
       e=p[i]
       if type(e) == "string" then 
          if not lx:is_keyword (lx:next(), e) then
-            parse_error (lx, "Keyword '%s' expected", e) end
+            parse_error (lx, "A keyword was expected, probably `%s'.", e) end
       elseif is_parser (e) then
          table.insert (r, e (lx)) 
       else 
-         gg.parse_error (lx,"Sequence `%s': element #%i is not a string "..
+         gg.parse_error (lx,"Sequence `%s': element #%i is neither a string "..
                          "nor a parser: %s", 
                          p.name, i, table.tostring(e))
       end
@@ -460,7 +460,7 @@ function expr (p)
          -- Check for non-associative operators, and complain if applicable. 
          -----------------------------------------
          elseif p2.assoc=="none" and p2.prec==prec then
-            parser_error (lx, "non-associative operator!")
+            parse_error (lx, "non-associative operator!")
 
          -----------------------------------------
          -- No infix operator suitable at that precedence