python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Understanding how to resolve reduce/reduce & shift/reduce conflicts
I have the following tokens, operator precedence and grammar rules in my parser.y file:
%token <intval> INTCONST
%token <realval> REALCONST
%token <strval> STRCONST
%token <strval...
Stelios Papamichail
Votes: 0
Answers: 1
How does Bison deal with some optional part in BNF grammars?
I'm a freshman in Bison and Compiler principles, now I'm trying to write an easy Verilog parser in Flex&Bison according to the IEEE Standard. Here is the question: when a grammar's body has option...
Zhiyi
Votes: 0
Answers: 1
How to replace a lexer token with two new tokens?
In XML an empty element can be represented in either of these ways:
<foo></foo>
<foo/>
If the input contains the latter, then I want to tokenize it like the former.
That is, if the ...
Roger Costello
Votes: 0
Answers: 1
Lexer that can be used in debug mode or in operational mode
I am reading a book that has a nifty way of designing a lexer so that, when DEBUG is defined, it outputs token is value for each token. I have a simple lexer that has a rule for a NAME and a rule for ...
Roger Costello
Votes: 0
Answers: 1