Commit graph

49 commits

Author SHA1 Message Date
c2728e4c83 output_slr: collapse duplicate case branches 2015-04-10 22:51:51 +02:00
0e9b564f8c output: rename i argument to state 2015-04-10 22:00:34 +02:00
4976085b72 generator_slr: fix follow set generation
Looks like my source of information was incomplete...
2015-04-10 21:02:29 +02:00
aeaeba2d73 Add support for escape sequences in character symbols 2015-04-10 19:10:17 +02:00
475326bf12 lex: initialize dumb_mode to false 2015-04-10 18:26:50 +02:00
8c3dd07dfb lex: remove now unused include and define 2015-04-10 18:03:22 +02:00
634e5db209 Don't parse keywords in the lexer 2015-04-10 18:01:10 +02:00
650fff74de parse: make grammar for toplevel directives more readable 2015-04-10 17:46:34 +02:00
48b791d443 Allow specifying sequences of character terminals as strings 2015-04-10 17:26:20 +02:00
5a54699f18 Replace hand-written parser by one generated by solar itself :D 2015-04-10 16:48:43 +02:00
a5d1689bc7 Implement SLR parser generation
At the moment, the generated parser is very inefficient, but that will change
soon.
2015-04-10 03:46:13 +02:00
7a14a8ec2f Split output_lr0_t out of output_t 2015-04-10 03:22:57 +02:00
8feccee75d generator_slr: implement first and follow set generation 2015-04-10 03:04:22 +02:00
70fc6ba8d2 generator: fix add_reduction() argument name 2015-04-09 19:44:01 +02:00
35c02202fd generator: move LR(0)-specific code to generator_lr0_t 2015-04-09 19:14:14 +02:00
5887ec38e1 generator: add generator_lr0 and generator_slr classes 2015-04-09 17:21:32 +02:00
e86d064002 lex: use std::string * instead of char * 2015-04-09 05:18:47 +02:00
7a65ee0c61 Introduce rule_t and grammar_t 2015-04-09 04:46:39 +02:00
ffe1e7bb96 lex: disable number parsing
It is not used at the moment
2015-04-09 04:13:42 +02:00
031fdb010e output: close output files 2015-04-09 04:00:05 +02:00
923ce33be1 output: correctly initialize parser state 2015-04-09 03:58:50 +02:00
59258d1f71 Add support for extra arguments 2015-04-09 03:31:20 +02:00
80abbf2be2 Emit alloc and free functions 2015-04-09 01:37:18 +02:00
9c990ae801 Allow adding source blocks to the top the of header and source files 2015-04-08 23:49:42 +02:00
7b8ebfcef1 Don't use map::emplace
It doesn't work with GCC 4.7...
2015-04-06 21:16:13 +02:00
1bb22babd9 output: emit include statement for header 2015-04-06 20:34:12 +02:00
fda24d9c22 Set output files from command line 2015-04-06 20:13:36 +02:00
d6deff997e Implement a lot of symbol value support 2015-04-06 18:50:03 +02:00
6fb60a7201 generator: detect LR(0) conflicts 2015-04-06 00:22:44 +02:00
696d94d796 lex: handle preprocesser directives embedded into code blocks 2015-04-05 19:17:24 +02:00
a4c2f94f8b output: make reduce actions static inline 2015-04-05 02:39:47 +02:00
9154865ac3 output: fix emission of terminal case conditions 2015-04-05 02:37:25 +02:00
96dd0ebd26 Add support for simple reduce actions 2015-04-05 02:28:52 +02:00
18f88fc863 lex: remove old comment 2015-04-04 20:39:24 +02:00
61c3aa15c3 Add simple output generator 2015-04-02 11:52:05 +02:00
ab2d315aa2 generator: remove printing, add some getters 2015-04-02 01:43:43 +02:00
531a4de1fc generator: split different actions into different maps 2015-04-01 02:42:54 +02:00
3f1b701ad1 generator: add actions and gotos for LR(0) parsers 2015-03-31 23:40:44 +02:00
342f927aac generator: generate transitions 2015-03-31 20:46:33 +02:00
03b5a87eeb generator: generate item sets recursively 2015-03-31 20:25:04 +02:00
129b81e093 generator: add methods to generate closed item sets 2015-03-31 18:38:59 +02:00
8b94b9cf2c solar: use grammar file from command line 2015-03-31 18:33:28 +02:00
8e7ce62c20 lex, parser: fix a few numbers ;) 2015-03-31 04:34:44 +02:00
a0cc8fcb08 parser: rename token_t and value_t to parser_token_t and parser_value_t 2015-03-31 04:25:38 +02:00
8b707351c7 Add generator_t 2015-03-31 04:09:03 +02:00
679aa45884 Rename state_t to parser_state_t 2015-03-31 00:04:32 +02:00
63640911b9 Don't create items with point at end 2015-03-31 00:01:18 +02:00
8de90acc67 Generate items from grammar 2015-03-27 03:55:26 +01:00
09972613c4 Some initial work 2015-03-25 23:52:08 +01:00