File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717
1818_DataType = Union [_ItemType , List [_ItemType ]]
1919
20+ # Pattern to transform HSD string values into actual Python data types
2021_TOKEN_PATTERN = re .compile (r"""
22+ # Integer
2123(?:\s*(?:^|(?<=\s))(?P<int>[+-]?[0-9]+)(?:\s*$|\s+))
2224|
25+ # Floating point
2326(?:\s*(?:^|(?<=\s))
2427(?P<float>[-+]?[0-9]*\.?[0-9]+(?:[eE][-+]?[0-9]+)?)(?:$|(?=\s+)))
2528|
29+ # Logical (Yes/No)
2630(?:\s*(?:^|(?<=\s))(?P<logical>[Yy][Ee][Ss]|[Nn][Oo])(?:$|(?=\s+)))
2731|
28- (?:\s*(?:(?P<qstr>(?P<quote>['"]).*?(?P=quote)) | (?P<str>.+?))(?:$|\s+))
32+ # Quoted string
33+ (?:\s*(?:(?P<qstr>(?P<quote>['"]).*?(?P=quote))
34+ |
35+ # Unquoted string
36+ (?P<str>.+?))(?:$|\s+))
2937""" , re .VERBOSE | re .MULTILINE )
3038
3139
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ Hamiltonian = DFTB {
2222 1.030000 3.800000 2.820000
2323 }
2424 }
25+ # Adding arbitrary comment, this should not change parsing result
2526 Filling = Fermi {
2627 Temperature [Kelvin] = 1e-08
2728 }
You can’t perform that action at this time.
0 commit comments