Add comment about the parsing table structure
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 20 Jun 2024 08:48:40 +0000 (10:48 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 20 Jun 2024 08:48:40 +0000 (10:48 +0200)
Parsing table shoud not contain any non-ASCII whitespace as
getting rid of multi-character whitespace is more challeging.

I mention it as I have encountered this problem and it was
somewhat difficult to find the cause.

inc/ft_parse.h

index b06c05ec6bd78e820d2c31b6494b5b0ad4838c6d..4de4635d9b358745fee1d2e18a23de64f165331b 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <ljiriste@student.42prague.com>   +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2024/05/27 21:21:54 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/06/16 08:17:25 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/06/20 10:44:37 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -52,16 +52,17 @@ typedef struct s_parser_state
 //     State token[i]               token[i+n]
 //     j     states[j].lookahead[i] states[0].goto[i]
 //
-//     The whitespace is not significant and ; should be used as separator.
-//     For ease of parsing the "end of input" token $ should be the last
-//     lookahead token. Additionally the states should be consecutive
-//     increasing integers starting at 0.
-//
 //     The first row contains all the n terminal tokens first
 //     and after them all the non-terminal tokens.
 //     Every other row contains the (unique) state number and the reduce/shift
 //     rule for the appropriate token.
 //
+//     The whitespace is not significant and ; should be used as separator.
+//     For ease of parsing the "end of input" token $ should be the last
+//     lookahead token. Additionally the states should be consecutive
+//     increasing integers starting at 0.
+//     Do not use non-ASCII whitespace!
+//
 //     The rules table should have the form
 //
 //     token[i_1] -> [ token[j_1] [ token[k_1] ... ]]