Salam❤️ I am beginner at Jison. Learning small things day by day. How I could work with Bangla Numbers with Jison? I meant, How can I work with jison and use Bangla Digits as NUMBER token and work with them (RESULT NUMBER MUST BE IN BANGLA) I used regex but it's not phrasing only tokenizing Please help me ❤️ Thank you
how to tokenize bangla digits as nunbers and work with them?
129 Views Asked by Taslima Akhter At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in JISON
- Parsing an SQL-like micro-language which is a superset of Javascript
- How can I get youtubeVideo Title from URL for android studio?
- Remove ambiguity in grammar for expression casting
- Syntax error in JISON with simple grammar
- How to make a chained comparison in Jison (or Bison)
- How to work with tokenized Bangla digits in Jison?
- how to tokenize bangla digits as nunbers and work with them?
- Error while tokenizing Bangla Number(Digits) as Number token using RegEx
- Parsing .aspx and .ascx files to use in a VSCode Prettier Plugin
- JISON: How do I avoid "dog" being parsed as "do"?
- Jison not assuming correct grammar
- How can I export a function from the jison parser to Angular?
- Jison parser generator shift reduce conflict with parenthesis, how to solve?
- Jison parser generator, shift reduce grammar conflict, how to solve?
- How to get balance from the response retutned by AT?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Jison doesn't attempt to convert between numbers and strings. All it does is identify where the numbers in the input are and how they relate to the other tokens in the input. That's what parsing is about: dividing text into parts. The rest is interpretation, and for that you need to use the programming language you are working with, in this case JavaScript.
Unfortunately (and slightly surprisingly) JavaScript's Unicode support is not very complete. In particular, it does not provide any official interface to the Unicode Character Database (UCD) or the Unicode properties in that database, except the minimum needed to implement a subset of Unicode regular expression matching (and that only if the regular expression has the
uflag set). So you can't do what would seem logical, which is consult the Numeric_Value property of each character.But since you're only interested in Bangla digits and not digits in all the scripts which Unicode can represent, it's reasonable to just hard-code the translation. So you could convert a Bangla number to a JavaScript number (that is, not a string) using
And convert a number back to a Bangla string using
With a more modern JavaScript, you could use
replaceAllinstead ofreplace(without thegflag). You could also usecodePointAtinstead ofcharCodeAtif your Javascript environment supports it, but in the case of Bangla digits it makes no difference at all.Note that the above does not handle commas, either for input or for output. If you want to write
৮৭৬৫৪৩২as৮৭,৬৫,৪৩২, you'll need to write some more code.