diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-08 10:49:35 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 1996-11-08 10:49:35 -0200 |
commit | a0e9bfbb48fdfae8188333710c2ce86051477a96 (patch) | |
tree | 1677b5297337621305f794dd690d1d720ad2df00 /lua.stx | |
parent | 2f19e0ba164d38989dea4a3389753ed75858e5a1 (diff) | |
download | lua-a0e9bfbb48fdfae8188333710c2ce86051477a96.tar.gz lua-a0e9bfbb48fdfae8188333710c2ce86051477a96.tar.bz2 lua-a0e9bfbb48fdfae8188333710c2ce86051477a96.zip |
syntax error function is in "lex.c" (it has the token)
Diffstat (limited to 'lua.stx')
-rw-r--r-- | lua.stx | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -1,6 +1,6 @@ | |||
1 | %{ | 1 | %{ |
2 | 2 | ||
3 | char *rcs_luastx = "$Id: lua.stx,v 3.39 1996/09/24 17:29:50 roberto Exp roberto $"; | 3 | char *rcs_luastx = "$Id: lua.stx,v 3.40 1996/09/25 21:52:00 roberto Exp roberto $"; |
4 | 4 | ||
5 | #include <stdio.h> | 5 | #include <stdio.h> |
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
@@ -59,13 +59,7 @@ int lua_debug = 0; | |||
59 | 59 | ||
60 | static void yyerror (char *s) | 60 | static void yyerror (char *s) |
61 | { | 61 | { |
62 | char msg[256]; | 62 | luaI_syntaxerror(s); |
63 | char *token = lua_lasttext(); | ||
64 | if (token[0] == 0) | ||
65 | token = "<eof>"; | ||
66 | sprintf (msg,"%s; last token read: \"%s\" at line %d in file `%s'", | ||
67 | s, token, lua_linenumber, lua_parsedfile); | ||
68 | lua_error (msg); | ||
69 | } | 63 | } |
70 | 64 | ||
71 | static void check_space (int i) | 65 | static void check_space (int i) |