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)
How to write a peg used in lpeg to parse lua itself?
As title say, I know lua has a offical extended BNF in The Complete Syntax of Lua. I want to write a PEG to pass to lpeg.re.compile to parse lua itself. Maybe the Lua PEG is something like it's BNF. I...
rangercyh
Votes: 0
Answers: 1
I am writing a lex code in which the regular expression section is given exactly like in the detailed section. Main problem I have is the RE for text
%{
#define FUNCT 300
#define IDENTIFIER 301
#define ASSGN 302
#define INTEGER 303
#define PRINT 304
#define TEXT 305
#define INPUT 3...
Aryan Banyal
Votes: 0
Answers: 1
How to run code on start of yylex and when token is matched in RE-flex
I was using RE-flex to generate a c++ Scanner for a project. I wanted to run code when a token is matched and I followed the Flex way of doing, but that ended up putting the code outside the function....
ishaangupte
Votes: 0
Answers: 1
How to make expression for grammar rule in Bison with Jflex
I've been trying to make a parser which takes tokens from a lexer (jflex), and ive used Java with bison for the parser. Here is my code so far for the parser:
%define api.prefix {EXAMPLE}
%define api....
Chronicle
Votes: 0
Answers: 0