Status update meeting

This commit is contained in:
Robin Jadoul 2017-01-14 20:31:40 +01:00
parent bb165c23f7
commit 4dd9fc7aeb
4 changed files with 59 additions and 31 deletions

53
TODO
View File

@ -1,23 +1,38 @@
(-) common infrastructure (grammar structure) T> Parser selection without enum (Thomas) (flexible matching (case insensitive, ...))
(2) backend plug per parser type (not LALR/SLR, but *LR)
(3) simple first config file parser (only grammar?)
(4) complete config file grammar
(-) lexer
(6) driver (resolution of parser type + backend, input/output files)
(7) main (option parsing, calling driver)
(8) backend (LR, c++)
(9) table (LALR(1))
(10) unit tests
R> Precedence resolution in generator
T> Parsodus regex parser in Lexesis
-> Vrijgeven in libraryformaat: mogelijkheid verschillende tokens opvragen
K> Parsodus Parsodus parser
-> Precedence
-> rule naming (problem: multiple rules same name -> change in backend)
-> grammar struct change to contain optional name per rule
-> Volgorde belangrijk?
-> Voorbeelden
R> JSON port?
-> brainfuck? bare bones? bash transpiler?
R> simple calculator
-> include in tests
-> Unit tests
-> LR(0)
-> SLR
-> LR(1)
-> LALR
#R 1 enkel LR(1)
#K 1 LR(1) + LALR(1)
#T 1 LR(0)
ROBIN: 8, 9, 10 -> Table generator (independent of specific tables)???
THOMAS: 2, 3, 6, 10 -> presentation
KOBE: 4, 7, 10 R> README
R> man pages
extras: -> Error reporting
-> bash completion -> bash completion
-> more tables/backends -> bool specialization in backend?
-> update lexesis parser -> publication / LICENSE
-> man pages
-> README
-> --- logging
-> write configuration sets, table
-> Generator: logging
-> driver/main: debug flag

View File

@ -7,10 +7,17 @@
namespace pds { namespace pds {
enum class PrecedenceType {
LEFT,
RIGHT,
NONASSOC
};
struct Config { struct Config {
util::ParserType parserType; util::ParserType parserType;
std::string lexesisFile; std::string lexesisFile;
Grammar grammar; Grammar grammar;
std::map<std::string, std::pair<int, PrecedenceType> > precedence; ///< lower value -> higher precedence
}; };
} }

View File

@ -1,12 +1,17 @@
parser: SLR(1) parser: SLR(1)
lexesis: lexer.lxs lexesis: lexer.lxs
terminals: terminals:
TERMINAL "A"
start: s "B"
"C"
"D"
precedence:
left "A" "D"
nonassoc "B"
right "C"
start: <start>
grammar: grammar:
s -> a s <start> ::= <x> <x> [startrule];
| b <x> ::= "A" <x> [xA]
; | "B" [xB]
;
a → TERMINAL;
b -> a;

View File

@ -10,10 +10,11 @@ RIGHT = right
NONASSOC = nonassoc NONASSOC = nonassoc
NUM = [1-9][0-9]* NUM = [1-9][0-9]*
LEXESISNAME = [_a-zA-Z]+\.lxs LEXESISNAME = [_a-zA-Z]+\.lxs
TERMINAL = [_A-Z]+ TERMINAL = "[_a-zA-Z]+"
VARIABLE = [_a-z]+ VARIABLE = <[_a-zA-Z]+>
ARROW = ->|→ ARROW = ::=
SEMICOLON = ; SEMICOLON = ;
COLON = : COLON = :
PIPE = \| PIPE = \|
RULENAME = \[[_a-zA-Z][_a-zA-Z0-9]*\]
ignore = \t| |\n|\r ignore = \t| |\n|\r