Zobrazení pomocí HTML

http://gitlab.fjfi.cvut.cz/culikzde/simple-view/-/blob/master/tutorial/plain-grammar/plain_tohtml.py

while_stat :  "while" "(" expr ")" stat   ;
 
if_stat    :  "if" "(" expr ")" stat ( "else" stat  )?   ;
 
compound_stat : "{" ( stat )* "}" ;
 
simple_stat :  expr ";" ;
 
empty_stat :  ";" ;
 
stat : while_stat | if_stat | compound_stat | simple_stat | empty_stat ;
 
 
simple_expr : identifier | number  | "(" expr ")" ;
 
mult_expr :  simple_expr ( ("*"|"/") simple_expr )* ;
 
add_expr :  mult_expr ( ("+"|"-") mult_expr )* ;
 
expr : add_expr ( "," expr )? ;
 
 
program : stat;

Výsledek http://kmlinux.fjfi.cvut.cz/~culikzde/sos/gram.html gram.html

 
prekl/gram_html.txt · Last modified: 2024/03/12 17:20 by 147.32.8.110
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki