|
Recently, I am started learning Antlr. And knew that lexer/parser together could be used in construction of programming languages.
Other than DSL & programming languages, Have you ever directly or in-directly used lexer/parser tools (and knowledge) to...
Answer Snippets (Read the full thread at stackoverflow):
For that matter, I'm sure that Google is employing some sort of lexer/parser for it's own query syntax but then you don't have....
Fields in a database and scads more I"m forgetting (I'm old) A great example of a lexer/parser.
|
|
Hi,
I'm trying to implement a python parser using PLY for the Kconfig language used to generate the configuration options for the linux kernel.
There's a keyword called source which performs an inclusion, so what i do is that when the lexer encounters...
Started by LB on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
So the lexer would, I clone my ....
The parser no longer calls the lexer because you can override the getToken function used by the parser the most sense to have a single lexer which managed the stack of include files.
|
|
I am working on a small text editor project and want to add basic syntax highlighting for a couple of languages (Java, XML..just to name a few). As a learning experience I wanted to add one of the popular or non popular Java lexer parser.
What project...
Started by Berlin Brown on
, 9 posts
by 9 people.
Answer Snippets (Read the full thread at stackoverflow):
But the language I....
All you need is first read the file extention to detect the language and then from a xml file with it .
I'm currently using both to develop a simple a lexer.
Are decent lexer and parser generators, respectively.
|
Ask your Facebook Friends
|
There are lots of parsers and lexers for scripts (i.e. structured computer languages). But I'm looking for one which can break a (almost) non-structured text document into larger sections e.g. chapters, paragraphs, etc.
It's relatively easy for a person...
Started by wilson32 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
You might be able....
They have minimal syntax and break input down into parseable syntactic pieces .
Many lightweight markup languages like markdown (which incidentally SO uses), reStructured text and (arguably) POD are similar to what you're talking about .
|
|
Which lexer/parser generator is the best (easiest to use, fastest) for C or C++? I'm using flex and bison right now, but bison only handles LALR(1) grammars. The language I'm parsing doesn't really need unlimited lookahead, but unlimited lookahead would...
Started by Zifre on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
LL....
If you are designing a DSL, you can use any the LALR parser generators without a lot of trouble precisely because you can change them.
Not exactly a parser generator but a great tool to handle grammars and I feel it can handle.
At ...
|
|
I'm working on a JavaScript collator/compositor implemented in Java. It works, but there has to be a better way to implement it and I think a Lexer may be the way forward, but I'm a little fuzzy.
I've developed a meta syntax for the compositor which is...
Started by VLostBoy on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
The "rules" starting with a capital are lexer-rules and....
"lexer" or tokenizer) or a syntax-directed parser a mixed grammar (ANTLR will generate both the lexer and parser).
Do you want to build a lexical scanner (a.k.a.
|
|
Is it always necessary to do so? What does it look like?
Started by Phenom on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
In yacc , your lexer....
As a side job a lexer can createLexer don't care about semantic the only mission in life for lexers is to convert the source code a symbols table.
Then are sent to a parser that deals with syntactic analysis.
|
|
Hello,
I am looking for a clear definition of what a "tokenizer", "parser" and "lexer" are and how they are related to each other (e.g., does a parser use a tokenizer or vice versa)? I need to create a program will go through c/h source files to extract...
Started by lordhog on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
I would say that a lexer and....
A lexer is basically a tokenizer, but it usually attaches extra context to the tokens".
A parser takes the stream of tokens from the lexer and turns it into an abstract syntax tree, new lines).
|
|
I am using a C lexer that is Flex-generated, and a C++ parser that is Bison-generated. I have modified the parser to acccept only string input.
I am calling the parser function yyparse() in a loop, and reading line by line of user input. I stop the loop...
Answer Snippets (Read the full thread at stackoverflow):
You have to reset question - I have a parser that can be compiled with Bison, Byacc, MKS Yacc or Unix Yacc, and I don't do with Gamecat; the most likely cause....
Of the book:
This means that you cannot restart a lexer just by calling yylex().
|
|
I am programming a lexer in C and I read somewhere about the header file tokens.h . Is it there? If so, what is its use?
Started by mekasperasky on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
With Lex ID (2) #define STRING (3)
Probably, tokens.h is a file generated by the parser generator (Yacc.
Bison) containing token definitions so you can return tokens from the lexer to the parser.
|