|
Given the following code,
Choices choices = new Choices(); choices.Add(new GrammarBuilder(new SemanticResultValue("product", "<product/>"))); GrammarBuilder builder = new GrammarBuilder(); builder.Append(new SemanticResultKey("options", choices....
Started by Kim Major on
, 6 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
An alternative, if you have very large grammars, would be to use the dictation grammar option first with some....
This can be done version.
It sounds like you need to use some indirection, via the a grammar rule reference.
|
|
I want to process a medium to large number of text snippets using a spelling/grammar checker to get a rough approximation and ranking of their "quality." Speed is not really of concern either, so I think the easiest way is to write a script that passes...
Started by Andrew Keeton on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Word.Application') doc = app.Documents.Open(path) print "Grammar: %d" % (doc.GrammaticalErrors.Count
Grammar: 2 Spelling: 3
which match the results when invoking the check manually from Word..
|
|
Hi,
I have a task to write a (toy) parser for a (toy) grammar using OCaml and not sure how to start (and proceed with) this problem.
Here's a sample Awk grammar:
type ('nonterm, 'term) symbol = N of 'nonterm | T of 'term;; type awksub_nonterminals = Expr...
Started by DV on
, 4 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Possible optimization : tail awksub_grammar in let....
Of course it would be much nicer if you could use streams combined with the preprocessor - straightforwardly descend into the grammar and try each branch in order.
Descent parser.
|
Ask your Facebook Friends
|
I have stumbled upon the following F77 yacc grammar: http://yaxx.cvs.sourceforge.net/viewvc/yaxx/yaxx/fortran/fortran.y?revision=1.3&view=markup .
How can I make a Fortran 77 parser out of this file using Happy ?
Why is there some C?/C++? code in that...
Started by Cetin Sert on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Just actions associated with the....
Use BNFC and write your own grammar to use Happy, port the BNF to the Happy definition syntax and write your semantics in Haskell.
On compilers floating around the Net, which are based on the book .
|
|
In a project that uses make and bison , I'm having difficulty specifying that the compiled grammar grammar.tab.c depends on the grammar input grammar.y , that each object file depends on a corresponding source file (including grammar.tab.o ), and that...
Started by Edmund on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
# you can consolidate both rules into one: grammar.tab.c grammar.tab.h: grammar.y linking c: $(OBJ) $(CC) $(LDFLAGS) -o ... .
If you're using GNU make, you can use the filter-out predicate to manually exclude a particular use at work.
|
|
I have been building a google-like query syntax parser in ANTLR (C#).
I am finished except for one thing, which I have struggled with for a long time and failed to solve.
If the user enters "word1 word2 word3", I want the parser to treat this the same...
Answer Snippets (Read the full thread at stackoverflow):
Expression : l=andexpression....
Re-posting here for those interested.
Works like a charm.
Terence
Answer was supplied by somebody on the ANTLR mailing list .
Best way is to do this:
andexpression : atom (AND_OP^ atom) ;
backtrack option is unnecessary too .
|
|
I think this is a stupid question, but I'm just starting out with ANTLR. I put together the "SimpleCalc" grammar from their tutorials, and generated it with C as the target language. I got SimpleCalcParser.c/.h and SimpleCalcLexer.c/.h as the output, ...
Started by Sam Lee on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
The very short answer is that ANTLR
In order to use the....
Instead of asking "how do I use the code" try asking "how to understand this before you can attempt to use the files it generates.
Question but change the direction slightly.
|
|
For example, for a comment describing
mq_open() { }
Do you use the imperative
// open a message queue
or third person?
// opens a message queue
Started by Steven on
, 7 posts
by 7 people.
Answer Snippets (Read the full thread at stackoverflow):
If I'm feeling funny I'll ....
Whatever grammar I feel likeI think that the use depends on the project you are working on; some open projects require you, not a statement.
Real reason for doing that), I prefer to use the imperative.
|
|
As the title says. I try to use correct grammar and spelling on forums all the time, unless I'm trolling and acting nooby. If I make a single mistake, I usually edit the post and fix it. On chat stuff, I usually type without capitals, SOMETIMES making...
Started by Fushigidane on
, 15 posts
by 14 people.
Answer Snippets (Read the full thread at pokemonelite2000):
I always use formal! I always do my best when it comes to grammar, so I can look silly/on a website....
I dont use correct grammar, not in wall posts.
^_^;;
However 90% of the time I IM, my grammar is crappy.
Not too lazy.
|
|
Grammar correction in older fiction?
May 17, 2012 6:46 AM Subscribe Correcting the grammar of other people. How long has this been a part of popular culture?
I can't think of a lot of older books I've read that have included this, but it seems to be quite...
Started by teraspawn on
, 13 posts
by 11 people.
Answer Snippets (Read the full thread at metafilter):
In the case of English, that would place before English there were Arabic grammar....
The casual correcting of grammar requires first that we have a formalized grammar.
Form since the beginning of a language's codification in grammar.
|