|
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.
|
|
Background
I want to be able to parse Javascript source in a Delphi Application. I need to be able to identify variables and functions within the source for the purpose of making changes to the code through later code. I understand that I probably need...
Started by jamiei on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Trimming those hooks and getting a plain lexer....
A highlighter in Synedit context is a lexer with special hooks to provide highlighting to the editor component.
For the lexer you can see Synedit's source code for the Javascript highlighter.
|
|
Using ANTLR v3 and the CSharp2 language specifier, is there any way to indicate that you want the generated lexer or parser to be internal versus the default of public?
The namespace is specified with:
@lexer::namespace {My.Namespace}
and I would assume...
Started by Bearddo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Will update if that changes..
On the entire parser/lexer class.
|
Ask your Facebook Friends
|
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.
|
|
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 ...
|
|
So, I am parsing Hayes modem AT commands. Not read from a file, but passed as char * (I am using C).
1) what happens if I get something that I totally don't recognize? How do I handle that? 2) what if I have something like
my_token: "cmd param=" ("value...
Answer Snippets (Read the full thread at stackoverflow):
That's the thing: the whole point of your parser and lexer is to blow up if you get bad input.
|
|
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.
|
|
I'd like to know if a tool like ANTLR would be appropiate for parsing these rules or it's overkill and I should make my own parser.
This is for parsing someone else's format, so I can't change it. It's for fun and to practice, so don't fret too much. ...
Started by Javier Badia on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
If your problem is simply that of parsing the rules, you might... .
Knowing how to create a lexical scanner and parser is a helpful skill.
Existing syntax that has a readily-available parser?
While your language is simple, using ANTLR has.
|
|
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).
|