Thanks.
26.09.2013, 06:39, "Evgeny Odegov" :
>> I want to different two kind types of comment - first - is comment which
>> begin from start line (first symbol of line is '/' or whitespaces and '/'
>> ), second - is comment which start with '/' but beffore was reading any
>> other symbol (exc
> I want to different two kind types of comment - first - is comment which
> begin from start line (first symbol of line is '/' or whitespaces and '/'
> ), second - is comment which start with '/' but beffore was reading any
> other symbol (except whitespaces)
> Javascript regexp for it is "^//.*\n
Thansk for answer, but it can't help. Simple example latter -
#lang racket/base
(require racket/string
parser-tools/lex
(prefix-in : parser-tools/lex-sre))
(define-tokens my-tokens (BCOMMENT COMMENT OT))
(define-empty-tokens my-empty-tokens (EOF NEWLINE))
(define-lex-abbre
Валентин,
maybe this short example could help
http://pastebin.com/ncZpH49E
>
> Hello. I need write rule for lexer for recognize comment which begin from
> first column of line.
> I have next regexp for comment (:seq "//" (:* (:~ CR LF))), aftrer add
> cr/lf to begin of expression i write (:seq L
Hello. I need write rule for lexer for recognize comment which begin from first
column of line.
I have next regexp for comment (:seq "//" (:* (:~ CR LF))), aftrer add cr/lf to
begin of expression i write (:seq LineTerminator (:* (:or #\space TAB FF))
"//" (:* (:~ CR LF))), but this regexp -fi
5 matches
Mail list logo