projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lexer: Change the functions for retrieving token strings.
[pspp-builds.git]
/
src
/
language
/
utilities
/
host.c
diff --git
a/src/language/utilities/host.c
b/src/language/utilities/host.c
index ae344367252bc053a1945480513c5f9ccc102395..f9b10480d2507c95d20dc677767c41c98639565f 100644
(file)
--- a/
src/language/utilities/host.c
+++ b/
src/language/utilities/host.c
@@
-129,26
+129,26
@@
cmd_host (struct lexer *lexer, struct dataset *ds UNUSED)
return CMD_FAILURE;
}
return CMD_FAILURE;
}
- if (lex_token (lexer) ==
'.'
)
+ if (lex_token (lexer) ==
T_ENDCMD
)
return shell () ? CMD_SUCCESS : CMD_FAILURE;
else if (lex_match_id (lexer, "COMMAND"))
{
struct string command;
bool ok;
return shell () ? CMD_SUCCESS : CMD_FAILURE;
else if (lex_match_id (lexer, "COMMAND"))
{
struct string command;
bool ok;
- lex_match (lexer,
'='
);
- if (!lex_force_match (lexer,
'['
))
+ lex_match (lexer,
T_EQUALS
);
+ if (!lex_force_match (lexer,
T_LBRACK
))
return CMD_FAILURE;
ds_init_empty (&command);
return CMD_FAILURE;
ds_init_empty (&command);
- while (lex_
token (lexer) == T_STRING
)
+ while (lex_
is_string (lexer)
)
{
if (!ds_is_empty (&command))
{
if (!ds_is_empty (&command))
- ds_put_
char
(&command, '\n');
- ds_put_substring (&command,
ds_ss (lex_tokstr (lexer)
));
+ ds_put_
byte
(&command, '\n');
+ ds_put_substring (&command,
lex_tokss (lexer
));
lex_get (lexer);
}
lex_get (lexer);
}
- if (!lex_force_match (lexer,
']'
))
+ if (!lex_force_match (lexer,
T_RBRACK
))
{
ds_destroy (&command);
return CMD_FAILURE;
{
ds_destroy (&command);
return CMD_FAILURE;