1
1
// Scintilla source code edit control
2
2
/** @file LexVHDL.cxx
4
** Written by Phil Reid,
4
** Written by Phil Reid,
6
** - The Verilog Lexer by Avi Yegudin
6
** - The Verilog Lexer by Avi Yegudin
7
7
** - The Fortran Lexer by Chuan-jian Shen
8
8
** - The C++ lexer by Neil Hodgson
126
126
sc.SetState(SCE_VHDL_IDENTIFIER);
127
127
} else if (sc.Match('-', '-')) {
128
128
sc.SetState(SCE_VHDL_COMMENT);
130
130
} else if (sc.Match('-', '-')) {
131
131
if (sc.Match("--!")) // Nice to have a different comment style
132
132
sc.SetState(SCE_VHDL_COMMENTLINEBANG);
249
249
char chPrev = '\0';
250
250
char chNextNonBlank;
251
251
int styleNext = styler.StyleAt(startPos);
252
int style = initStyle;
253
252
//Platform::DebugPrintf("Line[%04d] Prev[%20s] ************************* Level[%x]\n", lineCurrent+1, prevWord, levelCurrent);
255
254
/***************************************/
266
265
chNextNonBlank = styler.SafeGetCharAt(j);
267
int style = styleNext;
269
268
styleNext = styler.StyleAt(i + 1);
270
269
bool atEOL = (ch == '\r' && chNext != '\n') || (ch == '\n');
272
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
271
if (foldComment && atEOL && IsCommentLine(lineCurrent, styler))
274
273
if(!IsCommentLine(lineCurrent-1, styler) && IsCommentLine(lineCurrent+1, styler))
278
277
else if(IsCommentLine(lineCurrent-1, styler) && !IsCommentLine(lineCurrent+1, styler))
380
379
((strcmp(s, "begin") == 0) && (strcmp(prevWord, "function") == 0)) ||
381
380
((strcmp(s, "begin") == 0) && (strcmp(prevWord, "procedure") == 0)))
383
levelMinCurrentBegin = levelNext - 1;
382
levelMinCurrentBegin = levelNext - 1;
385
384
//Platform::DebugPrintf("Line[%04d] Prev[%20s] Cur[%20s] Level[%x]\n", lineCurrent+1, prevWord, s, levelCurrent);
386
385
strcpy(prevWord, s);
447
// access after alias all architecture array assert attribute begin block body buffer bus case component
448
// configuration constant disconnect downto else elsif end entity exit file for function generate generic
449
// group guarded if impure in inertial inout is label library linkage literal loop map new next null of
450
// on open others out package port postponed procedure process pure range record register reject report
451
// return select severity shared signal subtype then to transport type unaffected units until use variable
446
// access after alias all architecture array assert attribute begin block body buffer bus case component
447
// configuration constant disconnect downto else elsif end entity exit file for function generate generic
448
// group guarded if impure in inertial inout is label library linkage literal loop map new next null of
449
// on open others out package port postponed procedure process pure range record register reject report
450
// return select severity shared signal subtype then to transport type unaffected units until use variable
452
451
// wait when while with
455
454
// abs and mod nand nor not or rem rol ror sla sll sra srl xnor xor
458
// left right low high ascending image value pos val succ pred leftof rightof base range reverse_range
459
// length delayed stable quiet transaction event active last_event last_active last_value driving
457
// left right low high ascending image value pos val succ pred leftof rightof base range reverse_range
458
// length delayed stable quiet transaction event active last_event last_active last_value driving
460
459
// driving_value simple_name path_name instance_name
462
461
// Std Functions:
463
// now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector
464
// to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left
462
// now readline read writeline write endfile resolved to_bit to_bitvector to_stdulogic to_stdlogicvector
463
// to_stdulogicvector to_x01 to_x01z to_UX01 rising_edge falling_edge is_x shift_left shift_right rotate_left
465
464
// rotate_right resize to_integer to_unsigned to_signed std_match to_01
468
// std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed
469
// std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives
467
// std ieee work standard textio std_logic_1164 std_logic_arith std_logic_misc std_logic_signed
468
// std_logic_textio std_logic_unsigned numeric_bit numeric_std math_complex math_real vital_primitives
473
// boolean bit character severity_level integer real time delay_length natural positive string bit_vector
474
// file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic
472
// boolean bit character severity_level integer real time delay_length natural positive string bit_vector
473
// file_open_kind file_open_status line text side width std_ulogic std_ulogic_vector std_logic
475
474
// std_logic_vector X01 X01Z UX01 UX01Z unsigned signed