grammar
What does this JavaScript snippet mean? [duplicate]
This question already has answers here: What is the (function() { } )() construct in JavaScript? (28 answers)[详细]
2023-03-21 17:03 分类:问答Unambiguous grammar for arithmetic expression with Unary + and -
I have just started self-studying the Dragon book of Compiler Design. I am working on a problem that says to design grammar for an expression containin开发者_JAVA技巧g binary +,-,*,/ and unary +,-[详细]
2023-03-20 04:14 分类:问答Help with left factoring a grammar to remove left recursion
I have a small custom scripting language, and I am trying to update it to allow boolean expressions such as a > 2 and a > 2 and (b < 3 or c > 5).It\'s the parenthetical expressions that I[详细]
2023-03-19 03:41 分类:问答Chomsky Normal Form correctness
I have these productions: S->aSb S-> eps(eps=empty string) I should apply the Chomsky Normal Form My reasoning:[详细]
2023-03-18 12:29 分类:问答Can't match single character in Alex grammar
I finally got back to fleshing out a GitCommit message mode that I want to add to YI but I seem to missing something basic.I can\'t seem to match a single character in a grammar, all my rules only wor[详细]
2023-03-18 06:12 分类:问答What is the easiest way of automatically inserting code into existing c++ code?
For example, I want to insert a function call after every line. Such as: for (int i = 0; i < n; ++i)[详细]
2023-03-18 04:00 分类:问答SLR(1) Parser and epsilon involved
Let\'s suppose I have the following grammar: S → X X → a | ϵ If that grammar wouldn\'t have ϵ involved, I would construct the first state like:[详细]
2023-03-16 06:10 分类:问答Grammar ambiguity: why? (problem is: "(a)" vs "(a-z)")
So I am trying to implement a pretty simple grammar for one-line statements: # Grammar c: Character c[a-z0-9-][详细]
2023-03-16 05:25 分类:问答Grammar to recognize postfix formulas
I\'m trying to create a postfix to infix converter, and I\'m unable to create the grammar for postfix formulas. I\'ve been also looking for it for a while without success..[详细]
2023-03-16 02:44 分类:问答Conversion to Chomsky Normal Form
I do need your help. I have these productions: 1) A--> aAb 2) A--> bAa 3) A--> ε I should apply the Chomsky Normal Form (CNF).[详细]
2023-03-15 23:21 分类:问答