This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Drawing; | |
public class PolygonTriangulator | |
{ | |
/// <summary> | |
/// Calculate list of convex polygons or triangles. | |
/// </summary> | |
/// <param name="Polygon">Input polygon without self-intersections (it can be checked with SelfIntersection().</param> | |
/// <param name="triangulate">true: splitting on triangles; false: splitting on convex polygons.</param> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated from /tmp/Python3Runner-ForkJoinPool-1-worker-7-1661867391485/P.g4 by ANTLR 4.10.2-SNAPSHOT | |
# encoding: utf-8 | |
from antlr4 import * | |
from io import StringIO | |
import sys | |
if sys.version_info[1] > 5: | |
from typing import TextIO | |
else: | |
from typing.io import TextIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dis import dis | |
import sys | |
import timeit | |
warm_up_count = 4 | |
iteration_count = 256 | |
class C: | |
C0=0 | |
C1=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
lexer grammar L; | |
T_000000: 'T_000000______________________________________________________________________'; | |
T_000001: 'T_000001______________________________________________________________________'; | |
T_000002: 'T_000002______________________________________________________________________'; | |
T_000003: 'T_000003______________________________________________________________________'; | |
T_000004: 'T_000004______________________________________________________________________'; | |
T_000005: 'T_000005______________________________________________________________________'; | |
T_000006: 'T_000006______________________________________________________________________'; | |
T_000007: 'T_000007______________________________________________________________________'; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated from C:\Users\User\AppData\Local\Temp\BaseJavaTest-main-1643656434572\L.g4 by ANTLR 4.9.3 | |
import org.antlr.v4.runtime.Lexer; | |
import org.antlr.v4.runtime.CharStream; | |
import org.antlr.v4.runtime.Token; | |
import org.antlr.v4.runtime.TokenStream; | |
import org.antlr.v4.runtime.*; | |
import org.antlr.v4.runtime.atn.*; | |
import org.antlr.v4.runtime.dfa.DFA; | |
import org.antlr.v4.runtime.misc.*; |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generated from C:\Users\User\AppData\Local\Temp\BaseCppTest-main-1643540272050\L.g4 by ANTLR 4.9.3 | |
#include "L.h" | |
using namespace antlr4; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------ | |
// <auto-generated> | |
// This code was generated by a tool. | |
// ANTLR Version: 4.9.3 | |
// | |
// Changes to this file may cause incorrect behavior and will be lost if | |
// the code is regenerated. | |
// </auto-generated> | |
//------------------------------------------------------------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
List<IToken> codeTokens = new List<IToken>(); | |
List<IToken> commentTokens = new List<IToken>(); | |
Lexer preprocessorLexer = new CSharpLexer(new AntlrInputStream(sourceCode)); | |
// Collect all tokens with lexer (CSharpLexer.g4). | |
var tokens = preprocessorLexer.GetAllTokens(); | |
var directiveTokens = new List<IToken>(); | |
var directiveTokenSource = new ListTokenSource(directiveTokens); | |
var directiveTokenStream = new CommonTokenStream(directiveTokenSource, CSharpLexer.DIRECTIVE); | |
CSharpPreprocessorParser preprocessorParser = new CSharpPreprocessorParser(directiveTokenStream); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; R E SH I | |
; E S L I | |
; S I L E N | |
; Обявление уникальных букв | |
(declare-const R Int) | |
(declare-const E Int) | |
(declare-const SH Int) | |
(declare-const I Int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
class Program | |
{ | |
static void Main() | |
{ | |
int validTimeCount = 0; | |
for (int hour = 0; hour < 24; hour++) | |
{ |
NewerOlder