lexer
Define variable name except reservred worsd in a compiler
I am trying to do a lexer for a subset of Java with JavaCC. And a variable name can be any combination of letter, digit and _, beginning with a letter. I have only one problem, reserved words (such as[详细]
2023-04-11 16:47 分类:问答Characters Matching Multiple Lexer Rules in ANTLR
I\'ve defined multiple lexer rules that potentially matches the same character sequence.For example: LBRACE:\'{\' ;[详细]
2023-04-07 22:17 分类:问答Trouble with String.split in F#
I am having trouble with the following code, I am trying to build a lexer. Again I am using the examples from F# for Scientists.[详细]
2023-04-07 10:08 分类:问答Grammar To Parse Multiline Comments and String Literals Simultaneously
I am trying to parse C++/Java style source files and would like to isolate comments, string literals, and whitespaces as tokens.[详细]
2023-04-06 18:04 分类:问答ANTLR Parser Rules With String Literals
Say if my parser rules look like this: rule1 : \'functionA\' \'(\' expression-inside-parenthesis \')\';[详细]
2023-04-06 12:20 分类:问答A java.io.Reader class that can skip HTML tags?
I need to strip HTML out of large volumes of text. It would be cool if I could find a class that implements java.io.Reader that would wrap another Reader, and transform the text so as to omit all of t[详细]
2023-04-05 15:40 分类:问答Uses of writing Lexers and Parsers other than for Compilers?
What kind of problems other than writing compilers can be solved using Lexers and Parsers ? What are the advantages / disadvantages of using Lexers and Parsers over jus开发者_JS百科t writing regular[详细]
2023-04-04 15:24 分类:问答Scanner (Lexing keywords with ANTLR)
I have been working on writing a scanner for my program开发者_C百科 and most of the tutorials online include a parser along with the scanner. It doesn\'t seem possible to write a lexer without writing[详细]
2023-04-02 14:35 分类:问答Should I use/write a template lexer
I\'m using a PHP template engine I\'ve written some time ago. It relies on regexes to create a cached PHP file. Some examples of the syntax:[详细]
2023-03-29 03:42 分类:问答Easiest way to create a custom language hilighter in VS2010?
I\'ve been reading around, and all of the examples I\'ve seen (including on MSDN) are incomplete or way over my head. Is there some easy way to create a cu开发者_StackOverflowstom language syntax hili[详细]
2023-03-27 23:46 分类:问答