Files
pytorch/torch/csrc/jit/frontend/parser_constants.h
Scott Wolchok 47d34261e0 Rewrite the guts of torch::jit::Lexer to speed it up (#151850)
The trie-based approach was, apparently, not efficient. This incidentally fixes a bug where "not inp" and "is note" were lexed incorrectly; see test_lexer.cpp update.

Differential Revision: [D73129443](https://our.internmc.facebook.com/intern/diff/D73129443/)

Pull Request resolved: https://github.com/pytorch/pytorch/pull/151850
Approved by: https://github.com/Skylion007
ghstack dependencies: #151801, #151802, #151803, #151804, #151805, #151806, #151807, #151810, #151849
2025-04-25 23:49:35 +00:00

7 lines
158 B
C++

#pragma once
namespace torch::jit {
[[maybe_unused]] static const char* valid_single_char_tokens =
"+-*/%@()[]:,={}><.?!&^|~";
} // namespace torch::jit