grammar
Xtext: grammar for language with significant/semantic whitespace
How can I use Xtext to parse languages with semantic whitespace? I\'m trying to write a grammar for CoffeeScript and I can\'t f开发者_如何学运维ind any good documentation on this.Here\'s an example wh[详细]
2023-03-30 11:13 分类:问答Is there a syntax-directed editor generator, similar to XText, for Swing?
I would like to include a syntax-directed editor, as a kind of su开发者_Go百科per-rich edit box, in a Swing application. Is there anything that can help generate this from a grammar, in a similar way[详细]
2023-03-29 20:59 分类:问答ANTLR: Define new channel in grammar
I know it is possible to switch between the default and hidden token channels in an ANTLR grammar, but lets say I want a third channel. How can I define a new token channel in the gramar?For instance,[详细]
2023-03-29 07:00 分类:问答What choice of naming for this kind of units?
[EDIT] The question was a bit over-explained. Cumulative Consumption Instantaneous Average What would you name this kind of units?[详细]
2023-03-29 04:00 分类:问答Why does the C++ compiler give errors after lines instead of on them?
This question popped into my head today at work when I was having yet another domestic affair with my compiler.Despite my buff pinky (due to all the semicolon pressing I do at work), I managed to miss[详细]
2023-03-28 20:01 分类:问答Parse comment line
Given the following basic grammar I want to understand how I can handle comment lines. Missing is the handling of the <CR><LF> which usually terminates the comment line - the only exceptio[详细]
2023-03-28 19:57 分类:问答Is it possible to prove that L is a regular language?
Let L = {a^f(m) | m >= 1 } where f: Z^+ -> Z^+ is monotone increasing and complies that for all element n in Z^+ there is an m开发者_运维知识库 belonging to Z^+ such that f(m+1) - f(m) >= n.[详细]
2023-03-28 19:50 分类:问答How do I get a set of grammar rules from Penn Treebank using python & NLTK?
I\'m fairly new to NLTK and Python. I\'ve been creating sentence parses using the toy grammars given in the examples but I 开发者_如何学Cwould like to know if it\'s possible to use a grammar learned f[详细]
2023-03-28 13:27 分类:问答int a[] = {1,2,}; Why is a trailing comma in an initializer-list allowed?
Maybe I am not from this planet, but it would seem to me that the following should be a syntax error:[详细]
2023-03-28 06:05 分类:问答GOLD Parser : ANSI-C grammar not actually parsing ANSI-C?
I\'m trying to test the ANSI-C grammar provided on the GOLD Parser website. I ca开发者_如何学Gon\'t seem to even completly parse the smallest of the C file.[详细]
2023-03-28 04:49 分类:问答