- 
                Notifications
    You must be signed in to change notification settings 
- Fork 36
error codes
        Olivier Duhart edited this page Aug 31, 2020 
        ·
        5 revisions
      
    When an error occured when building a lexer or parser| | CSLY returns a list of errors with an errorCode.
All error code are defined in ErrorCodes.cs
| Label | value | meaning | 
|---|---|---|
| LEXER_UNKNOWN_ERROR | 0 | an unknown error | 
| LEXER_CANNOT_MIX_GENERIC_AND_REGEX | 1 | lexer CAN NOT mix regex and generic lexemes (see Lexers) | 
| LEXER_DUPLICATE_STRING_CHAR_DELIMITERS | 2 | generic lexer | 
| LEXER_TOO_MANY_COMMNENT | 3 | cannot define many comment with [Comment]attribute | 
| LEXER_TOO_MANY_MULTILINE_COMMNENT | 4 | cannot define many multi line comment with [MultiLineComment]attribute | 
| LEXER_TOO_MANY_SINGLELINE_COMMNENT | 5 | cannot define many single line comment with [SingleLineComment]attribute | 
| LEXER_CANNOT_MIX_COMMENT_AND_SINGLE_OR_MULTI | 6 | can not mix [Comment]with[MultiLineComment]or[SingleLineComment] | 
| LEXER_SAME_VALUE_USED_MANY_TIME | 7 | the same int value have been used for many lexeme. this could lead to misbehaving lexer | 
| LEXER_STRING_DELIMITER_MUST_BE_1_CHAR | 8 | a string delimiter must be exactly 1 char long | 
| LEXER_STRING_DELIMITER_CANNOT_BE_LETTER_OR_DIGIT | 9 | a string delimiter cannot be a letter or digit | 
| LEXER_STRING_ESCAPE_CHAR_MUST_BE_1_CHAR | 10 | a string escape char must be exactly 1 char long | 
| LEXER_STRING_ESCAPE_CHAR_CANNOT_BE_LETTER_OR_DIGIT | 11 | a string escape char cannot be a letter or digit | 
| LEXER_CHAR_DELIMITER_MUST_BE_1_CHAR | 12 | a char delimiter must be exactly 1 char long | 
| LEXER_CHAR_DELIMITER_CANNOT_BE_LETTER | 13 | a char delimiter cannot be a letter or digit | 
| LEXER_CHAR_ESCAPE_CHAR_MUST_BE_1_CHAR | 14 | a char escape char must be exactly 1 char long | 
| LEXER_CHAR_ESCAPE_CHAR_CANNOT_BE_LETTER_OR_DIGIT | 15 | a char escape char cannot be a letter or digit | 
| Label | value | meaning | 
|---|---|---|
| PARSER_UNKNOWN_ERROR | 100 | an unknown error occured | 
| PARSER_MISSING_OPERAND | 101 | when using parser expression generator an [Operand]is mandatory | 
| PARSER_REFERENCE_NOT_FOUND | 102 | a rule references a non terminal that is not defined | 
| PARSER_MIXED_CHOICES | 103 | a choice clause can not mix terminal and non terminal (see alternat choice) | 
| PARSER_NON_TERMINAL_CHOICE_CANNOT_BE_DISCARDED | 104 | a non terminal choice clause can not e discarded (see alternat choice) | 
| PARSER_INCORRECT_VISITOR_RETURN_TYPE | 105 | visitor return type does not respect typing rules (see typing)) | 
| PARSER_INCORRECT_VISITOR_PARAMETER_TYPE | 106 | visitor parameter type does not respect typing rules (see typing)) | 
| PARSER_INCORRECT_VISITOR_PARAMETER_NUMBER | 107 | visitor parameters does not typing rules (see typing)) |