Changes between Version 5 and Version 6 of LexicalAnalysis
- Timestamp:
- Oct 21, 2013, 4:23:37 PM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
LexicalAnalysis
v5 v6 66 66 The output of "RE2re2c.py" is re2c like file and all strings from text file is transformed into Unicode code point format. If lexical rule contains signs ".*" in RE than it is replaced by special macro STRING. The STRING macro is specified as follows: {{{STRING = [^\t\n\r\0]*}}}. '''This is only special macro and user is not allowed to specified macro with name STRING.''' 67 67 68 In tag regular expression part sign ".*" s replaced with STING or if there are some strings like "k1" then sign is replaced by [^ \t\n\r\0k]*. This modification makes program faster when the re2c file is transformed in final automata written in C-code.68 In tag regular expression part sign ".*" s replaced with STING or if there are some strings like "k1" then sign is replaced by [^^\t\n\r\0k]*. This modification makes program faster when the re2c file is transformed in final automata written in C-code. 69 69 70 70 The command to generate C-code from re2c file is: {{{re2c -isuF -o analyze_lex.c analyze_lex.re2c}}}. In SYNT system Makefile makes all work. 71 71 72 72 Commands for RE2re2c.py: [[BR]] 73 74 {{{stdin | ./RE2re2c.py [-u] > stdout}}}[[BR]] 75 {{{stdin | ./RE2re2c.py -o output [-u]}}}[[BR]] 76 {{{./RE2re2c.py -i input -o output [-u]}}}[[BR]] 77 {{{./Re2re2c.py -i input [-u] > stdout}}}[[BR]]