Created
July 24, 2023 09:05
-
-
Save opparco/f3ab778410e544fbfc20ca950a671e5b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
filename = '../grammars/japanese.gbnf' | |
print(f"overwrite {filename}") | |
with open(filename, 'w', encoding='utf-8') as f: | |
f.write("""# | |
root ::= char+ ([ \\t\\n] char+)* | |
char ::= [\u3000-\u303F\u3040-\u309F\u30A0-\u30FF\u4E00-\u9FFF\uFF21-\uFF3A\uFF41-\uFF5A\uFF10-\uFF19]""") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment