2012-02-14から1日間の記事一覧
既にBNFで書けているわけなので、構文解析器生成系があれば簡単に解析器を自動生成できる。 parser.y %{ #include <stdio.h> int yylex(void); void yyerror(char const *); %} %token CHAR_EXCEPT_PARENTHESIS %% text : string_headed | marked_string_headed ; str</stdio.h>…
その日の書き物のsnippets置き場
C|CSS||comp|Graphviz||phys||étoile|off-topic||一覧
C|C++|CSS|FORTRAN|Java|Lua|XML||comp|cairo|GMP/MPFR|gnuplot|Graphviz|GTK+|MTCTM||
math|phys||étoile|memo|off-topic||一覧
既にBNFで書けているわけなので、構文解析器生成系があれば簡単に解析器を自動生成できる。 parser.y %{ #include <stdio.h> int yylex(void); void yyerror(char const *); %} %token CHAR_EXCEPT_PARENTHESIS %% text : string_headed | marked_string_headed ; str</stdio.h>…