Status update meeting
This commit is contained in:
parent
bb165c23f7
commit
4dd9fc7aeb
55
TODO
55
TODO
|
@ -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)
|
||||||
|
|
||||||
|
-> Table generator (independent of specific tables)???
|
||||||
|
-> presentation
|
||||||
|
R> README
|
||||||
|
R> man pages
|
||||||
|
|
||||||
ROBIN: 8, 9, 10
|
-> Error reporting
|
||||||
THOMAS: 2, 3, 6, 10
|
-> bash completion
|
||||||
KOBE: 4, 7, 10
|
-> bool specialization in backend?
|
||||||
|
-> publication / LICENSE
|
||||||
extras:
|
|
||||||
-> bash completion
|
|
||||||
-> more tables/backends
|
|
||||||
-> update lexesis parser
|
|
||||||
-> man pages
|
|
||||||
-> README
|
|
||||||
|
|
||||||
|
-> --- logging
|
||||||
|
-> write configuration sets, table
|
||||||
|
-> Generator: logging
|
||||||
|
-> driver/main: debug flag
|
||||||
|
|
|
@ -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
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue