55#include <boost/regex/pending/unicode_iterator.hpp>
56#include <boost/spirit/home/support/char_encoding/unicode.hpp>
66 return (cp >= 0x1F000 && cp <= 0x1FAFF)
67 || (cp >= 0x2600 && cp <= 0x27BF)
68 || (cp >= 0x2B00 && cp <= 0x2BFF);
76 || cp == 0xFE0E || cp == 0xFE0F
88 return boost::spirit::char_encoding::unicode::isalpha(cp)
97 return boost::spirit::char_encoding::unicode::isalnum(cp)
98 || cp == U
'[' || cp == U
']' || cp == U
'_'
112 boost::u8_to_u32_iterator<std::string::const_iterator> it(s.begin(), s.begin(), s.end());
113 boost::u8_to_u32_iterator<std::string::const_iterator> end(s.end(), s.begin(), s.end());
116 for (++it; it != end; ++it)
132 throw std::runtime_error(
133 "invalid variable name \"" + s +
"\": a name must be a nonempty identifier -- "
134 "it starts with a letter (ASCII or Unicode, e.g. x or \xCE\xA9) and continues with "
135 "letters, digits, or [ ] _ . Expressions, operators, whitespace, and leading "
136 "digits are not allowed.");
Definition configured.hpp:34
bool IsEmojiGlue(char32_t cp)
True if cp only extends an emoji cluster – valid mid-name to glue a multi-code-point emoji,...
Definition naming.hpp:73
bool IsEmojiBase(char32_t cp)
True if cp is in a primary emoji / pictographic range, so a name may start with it (🎉,...
Definition naming.hpp:64
Definition algorithm_builder.hpp:36
bool IsIdentStart(char32_t cp)
True if code point cp may START an identifier: any Unicode letter (ASCII A-Z a-z, plus Ω,...
Definition naming.hpp:86
bool IsValidVariableName(std::string const &s)
True if s is a well-formed identifier: nonempty, a valid UTF-8 IsIdentStart code point followed by ze...
Definition naming.hpp:106
bool IsIdentCont(char32_t cp)
True if code point cp may CONTINUE an identifier: any Unicode alphanumeric, one of the legacy continu...
Definition naming.hpp:95
void ThrowIfInvalidVariableName(std::string const &s)
Throw std::runtime_error if s is not a valid variable name (.
Definition naming.hpp:129