projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
pspp-mode.el: Make indentation closer to what lisp people like.
[pspp]
/
src
/
data
/
identifier.h
diff --git
a/src/data/identifier.h
b/src/data/identifier.h
index fe030d1c08ffb680cfe4f48855a50583912fb742..b7affdb192823f094994c6c662ffa0a3e992b2df 100644
(file)
--- a/
src/data/identifier.h
+++ b/
src/data/identifier.h
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2010 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2010
, 2011
Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-35,8
+35,8
@@
TOKEN_TYPE(ASTERISK) /* * */ \
TOKEN_TYPE(SLASH) /* / */ \
TOKEN_TYPE(EQUALS) /* = */ \
TOKEN_TYPE(ASTERISK) /* * */ \
TOKEN_TYPE(SLASH) /* / */ \
TOKEN_TYPE(EQUALS) /* = */ \
- TOKEN_TYPE(LPAREN) /* (
*/ \
- TOKEN_TYPE(RPAREN) /*
) */ \
+ TOKEN_TYPE(LPAREN) /* (*/ \
+ TOKEN_TYPE(RPAREN) /*) */ \
TOKEN_TYPE(LBRACK) /* [ */ \
TOKEN_TYPE(RBRACK) /* ] */ \
TOKEN_TYPE(COMMA) /* , */ \
TOKEN_TYPE(LBRACK) /* [ */ \
TOKEN_TYPE(RBRACK) /* ] */ \
TOKEN_TYPE(COMMA) /* , */ \
@@
-68,11
+68,18
@@
enum token_type
#undef TOKEN_TYPE
};
#undef TOKEN_TYPE
};
+const char *token_type_to_name (enum token_type);
const char *token_type_to_string (enum token_type);
/* Tokens. */
bool lex_is_keyword (enum token_type);
const char *token_type_to_string (enum token_type);
/* Tokens. */
bool lex_is_keyword (enum token_type);
+/* Validating identifiers. */
+#define ID_MAX_LEN 64 /* Maximum length of identifier, in bytes. */
+
+bool id_is_valid (const char *id, const char *dict_encoding, bool issue_error);
+bool id_is_plausible (const char *id, bool issue_error);
+
/* Recognizing identifiers. */
bool lex_is_id1 (char);
bool lex_is_idn (char);
/* Recognizing identifiers. */
bool lex_is_id1 (char);
bool lex_is_idn (char);
@@
-87,7
+94,4
@@
bool lex_id_match_n (struct substring keyword, struct substring token,
size_t n);
int lex_id_to_token (struct substring);
size_t n);
int lex_id_to_token (struct substring);
-/* Identifier names. */
-const char *lex_id_name (enum token_type);
-
#endif /* !data/identifier.h */
#endif /* !data/identifier.h */