lexical-analysis
Is this the job of the lexer?
Let\'s say I was lexing a ruby method definition: def print_greeting(greeting = \"hi\") end Is it the lexer\'s job to maintain state and emit relevant tokens, or should it be relati开发者_如何学运维[详细]
2023-03-13 16:24 分类:问答How do you parse context-sensitive C-code?
One issue I ran into was that C must be context-sensitive and cannot be parsed with one token of lookahead.For example[详细]
2023-03-05 22:31 分类:问答Switching between Configuration languages in ScintillaNet?
We\'re trying to implement an editor for a mix between javascript and HTML based on ScintillaNet. The javascript code is embedded in between <SCRIPT> </SCRIPT> tags...[详细]
2023-03-03 18:23 分类:问答How to show Japanese characters in Mac OS X Terminal?
So I\'m running MeCab (http://mecab.sourceforge.net/#download) to word-segment and do morpho-analysis of Japanese sentences. However, when I run the program, I see abracadabra due to some encoding iss[详细]
2023-03-03 05:20 分类:问答How to REGEX // in C? Single line comments
I used the following to get it to work partially: %{ #define OR 2 #define AND 3 ......... ......... %} delim[ \\t][详细]
2023-02-22 21:43 分类:问答Lexing space seperated words in ANTLR3 where some words are keywords
I am working on a project that involves transforming part of speech tagged text into an ANTLR3 AST with phrases as nodes of the AST.[详细]
2023-02-22 11:27 分类:问答What Javascript constructs does JsLex incorrectly lex?
JsLex is a Javascript lexer I\'ve written in Python.It does a good job for a day\'s work (or so), but I\'m sure there are cases it gets wrong.In particular, it doesn\'t understand anything about semic[详细]
2023-02-22 07:36 分类:问答What can create a lexical error in C?
Besi开发者_C百科des not closing a comment /*..., what constitutes a lexical error in C?Here are some:[详细]
2023-02-22 00:55 分类:问答Table-driven lexical analyzer/scanner implementation
Actually I have two questions. If I start writing my own lexical analyzer, parser what architecture it will be? Wha开发者_高级运维t principles should I consider (i.e. Open-Close, loose coupling)?[详细]
2023-02-16 23:26 分类:问答How do lexical analyzers handle comment and escape sequences?
Comment and escape sequence (such as string literal) are very exceptional from regular symbolic representation.[详细]
2023-02-15 15:29 分类:问答