I am looking for a way to define what you expect the user to say in an <input> tag with the HTML 5 speech attribute set.  I know that you can specify a specific grammar to use via the grammar attribute, like this: <input type="text"...
I currently implementing a JavaScript/ECMAScript 5.1 parser with JavaCC and have problems with the ArrayLiteral production.  ArrayLiteral :     [ Elision_opt ]     [ ElementList ]     [ ElementList , Elision_opt ]  ElementList :     Elision_opt Assig...
I currently implementing a JavaScript/ECMAScript 5.1 parser with JavaCC and have problems with the ArrayLiteral production.  ArrayLiteral :     [ Elision_opt ]     [ ElementList ]     [ ElementList , Elision_opt ]  ElementList :     Elision_opt Assig...
I am writing a simple Jison grammar in order to get some experience before starting a more complex project. I tried a simple grammar which is a comma separated list of numeric ranges, with ranges where the beginning and ending values were the same to...
How do you build an AST (Abstract Syntax Tree) for left-associative operators using PEG.js?  I've tried to write some code based on the information I found on the internet, but I seem to have made a mistake.  The code I wrote generates an incorre...
This is more a theoretical question than a practical one. It's about the parsing of some code delimited by curly braces.  Here are two examples of object initializers :  f({}); ({a:3})   Here are two examples of blocks :  ;{} {a:3;}   In practice...
Given the following nearley code:     @builtin "whitespace.ne"     @{%     let numberedParams = {        3: 45    };     const lexer = require("moo").compile({        comment: /\(.*?\)/,        expstart: /\[/,        expend: /\]/,...
My compilers class requires us to find a yacc grammar for one of these languages and combine it with the tokenizer we wrote. Presumably this is something easy to Google but I can't find it and my classmates are struggling as well. A yacc grammar...
I am working with reflect.js (a nice Javascript parser) from Zach Carter on github; I am trying to modify the behavior of his parser to handle comments as normal tokens that should be parsed like anything else.  The default behavior of reflect.js is...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.