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

55
TODO
View File

@ -1,23 +1,38 @@
(-) common infrastructure (grammar structure)
(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
T> Parser selection without enum (Thomas) (flexible matching (case insensitive, ...))
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)
-> Table generator (independent of specific tables)???
-> presentation
R> README
R> man pages
ROBIN: 8, 9, 10
THOMAS: 2, 3, 6, 10
KOBE: 4, 7, 10
extras:
-> bash completion
-> more tables/backends
-> update lexesis parser
-> man pages
-> README
-> Error reporting
-> bash completion
-> bool specialization in backend?
-> publication / LICENSE
-> --- logging
-> write configuration sets, table
-> Generator: logging
-> driver/main: debug flag

View File

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

View File

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

View File

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